4-3为什么蓝色广告在左边呢?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | <!DOCTYPE html><html><head> <meta charset="UTF-8"><title></title><style>*{padding:0;margin:0;}.bag{width:100%;height:4033px;background:url("bag.png") center top no-repeat;}.list1{width:100%;height:364px;background:url("list1.png") no-repeat;top:50%;left:0;margin-top:-132px;position:fixed;}.list2{width:100%;height:364px;background:url("list2.png") no-repeat;top:50%;right:0;margin-top:-132px;position:fixed;}</style></head><body><div class="bag"><div class="list1"></div><div class="list2"></div></div></body></html> |
20
收起
正在回答
1回答
2个广告的宽度不能设为100%,100%的话,左右定位就没有意义了。可以设为200px

前端小白入门系列课程
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36712 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星