overflow: hidden的疑问
老师给的部分成品源代码如下,注释掉157、162、176后,会出现下面的问题
*{ padding: 0px; margin: 0px; } body { font-size: 14px; } .header{ margin:25px auto; width: 1200px; } .header .menu ul{ display: none; list-style: none; position: absolute; width: 80px; opacity: 0.5; background-color: white; } .header .menu .menu_title{ border-bottom: 1px solid black; padding-bottom: 20px; width: 80px; text-align: center; } a{ text-decoration: none; color: black; } .header .menu ul li{ margin-top: 20px; text-align: center; } .header .logo{ float: left; position: relative; } .header .menu{ float: left; position: relative; margin-top:12px; margin-left:16px; } .header .auth { margin-top:12px; float: right; } .header .auth ul li { float: left; margin-right: 50px; list-style: none } .content{ width: 1200px; margin:25px auto; /*background-color: #ccc;*/ } .content .banner .banner-img{ margin-top: 20px; } .content .img-content ul{ width: 1260px; } .content .img-content ul li{ width: 360px; float:left; margin:0 60px 60px 0; list-style: none; /*设置边框等格式*/ margin-top:30px; height: 500px; box-shadow: 0px 0px 3px 3px #ccc; -webkit-box-shadow: 0px 0px 3px 3px #ccc;/*谷歌浏览器*/ -moz-box-shadow: 0px 0px 3px 3px #ccc;/*火狐*/ background-color:#FFFFFF; } /*设置标题*/ .img-content>ul>li .info h3{ font-size:25px; color: red; margin-top: 20px; margin-bottom: 20px; } /*段落的行间距*/ .img-content>ul>li .info p{ line-height: 25px; margin-bottom:20px; } body{ background-color:#F5F5F5; } .info{ margin-left:30px; margin-right: 30px; } .img-content>ul>li .price{ color: red; font-size: 20px; } .img-content .info .img-btn{ width: 300px; } .img-content .info .img-btn .btn{ width: 60px; height: 30px; background-color: red; text-align: center; border-radius: 5px; float:right; } .img-content .info .img-btn .cart img{ width: 25px; height: 20px; margin-top: 5px; } .img-content .info .img-btn .price{ float: left; } .page-nav ul li{ float: left; margin-right:20px; list-style: none; } .page-nav{ width: 100%; height: 60px; line-height: 60px; border:1px solid black; /*overflow: hidden;*/ } .page-nav ul{ margin:auto; /*overflow: hidden;*/ width: 500px; } .first-page{ border-radius: 50%; background-color: #c5c5c5; padding: 3px 9px; } .footer{ width: 1200px; height:100px; margin:60px auto; border-top:1px solid #ccc; /*overflow: hidden;*/ }
在这之中 overflow到底在起什么作用
11
收起
正在回答 回答被采纳积分+1
1回答
2. 从网页搭建入门JavaWeb
- 参与学习 人
- 提交作业 676 份
- 解答问题 9666 个
本阶段将从前端网页搭建入手,到Java Web基础,前后端结合助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星