我想呈现以下展示效果:实际展示效果如下:代码如下:帮忙看下为什么span box2没有生效呢
1 回答
聪明的汤姆
TA贡献112条经验 获得超33个赞
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Document</title><style>.box {position: relative;width: 600px;height: 400px;background: pink;border: 1px solid green;margin: 0 auto;}.box span {width: 80px;height: 30px;background: yellow;border: 1px solid green;}.box1 {position: absolute;top: 10px;left: 10px;}.box2 {position: absolute;bottom: 10px;right: 10px;}</style></head><body><div class="box"><span class="box1">box1</span><span class="box2">box2</span></div></body></html>
- 1 回答
- 0 关注
- 736 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消