您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

CSS 的overflow:hidden 属性详细解释

2024/5/6 1:04:56发布32次查看
overflow:hidden这个css样式是大家常用到的css样式,但是大多数人对这个样式的理解仅仅局限于隐藏溢出,而其实它还有清除浮动这个功能。
1 html> 2 head> 3 meta http-equiv=content-type content=text/html charset=utf-8 /> 4 title>taobao demotitle> 5 style type=text/css> 6 body{font:12px/1.5 tahoma,arial,sans-serif} 7 a{text-decoration: none;} 8 .search-tips{float: right;} 9 .search-tips a{color: #6c6c6c;}10 .search-button{float:right;}11 .btn-search{width:149px;height:44px;border: 0;cursor: pointer;}12 .search-common-pannel{13 height: 44px;14
padding: 3px 0px 3px 0px; //设置边框距离15 }16 .search-common-pannel input{17 height: 44px;18 line-height: 44px;19 width: 100%;20 border:0;21 outline: 0;22 background-color: #fff;23 } 24 style>25 head>26 body>27 div class=search-container>28 div class=search-pannel>29 form> 30 div class=search-button>31 button class=btn-search type=submit>button>32 div>33 div class=search-common-pannel>34 input type=text name=>35 i>i> 36 div> 37 form>38 div>39 div>40 body>41 html>
这段代码是一个做淘宝搜索框中的一段代码,这里overflow:hidden就起到了一个清除浮动的效果。 具体代码可以看慕课网http://www.imooc.com/video/282里的教程
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product