请老师看一下是否正确
来源:7-2 编程练习
慕粉1474288341
2019-10-15 13:53:22
<!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> #div0{ /*width: 100%; height: 800px; background-image: url(http://climg.mukewang.com/59c9f7ce0001839219034033.png);*/ } #div1{ position: fixed; top: 50%; margin-top: -182px; left: 0px; } #div2{ position: fixed; top: 50%; right: 0px; margin-top: -182px; } </style> </head> <body> <div id="div0"> <img src="http://climg.mukewang.com/59c9f7ce0001839219034033.png"> </div> <div id="div1"> <img src="http://climg.mukewang.com/5a3383c70001f1b702240364.png"> </div> <div id="div2"> <img src="http://climg.mukewang.com/5a3383d00001a3dd02240364.png"> </div> </body> </html>
另外这里的网页背景图片到底是在div里加一个image标签好,还是给div设置background-image好呢
1回答
好帮手慕柯南
2019-10-15
同学你好!
完成的不错,同学提问的问题,在这里使用背景图和img都是可以的。只要效果正确即可。
如果我的回答解决了你的疑惑,请采纳,祝学习愉快~
相似问题