老师帮忙看看 优化下,谢谢
来源:4-11 编程练习
一往而深灬
2020-06-21 22:18:02
<!DOCTYPE html> <html> <head> <title></title> <link rel="stylesheet" href="index.css"> </head> <body> <div class="main"> <div> <img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg"> <p>欢迎来到慕课网学习新知识</p> </div> <div> <img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg"> <p>欢迎来到慕课网学习新知识</p> </div> <div> <img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg"> <p>欢迎来到慕课网学习新知识</p> </div> <div> <img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg"> <p>欢迎来到慕课网学习新知识</p> </div> <div> <img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg"> <p>欢迎来到慕课网学习新知识</p> </div> <div> <img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg"> <p>欢迎来到慕课网学习新知识</p> </div> </div> </body> </html>
*{ margin:0px; padding: 0px; } .main{ width:806px; height:376px; border:1px dashed gray; position: relative; top:10px; left:10px; } .main div{ width: 240px; border:1px solid gray; float: left; margin-top: 20px; margin-left: 20px; text-align: center; } img{ vertical-align: bottom; }
1回答
同学你好,复制运行贴出代码运行效果没有问题,实现了题目要求的浮动效果,很棒呐,继续加油
祝:学习愉快~
相似问题