检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:罗才华[1] Luo Caihua(Department of Electronic Information,Luoding Polytechnic,Luoding,Guangdong 527200,China)
机构地区:[1]罗定职业技术学院电子信息系,广东罗定527200
出 处:《计算机时代》2018年第10期64-67,共4页Computer Era
基 金:广东职业教育信息化研究会科研规划项目2016-2017年度课题(YZJY161720);2016年度广东省高等职业教育研究会课题(GDGZ16Y079);罗定职业技术学院2016年度科研项目(KY2016029)
摘 要:浮动是CSS的基本定位机制之一,在网页布局中应用非常广泛。本文对浮动引起的父元素高度坍塌现象进行了分析,并提出了clear属性和触发新的BFC两种清除浮动的方法。实验结果表明,在众多触发新的BFC条件中,.clearfix清除浮动的方式在不破坏文档结构的同时,也没有增加太多的代码,在解决浏览器兼容性问题方面也表现突出。Float is one of the basic positioning mechanisms of CSS and is widely used in web layout. This paper analyzes the phenomenon of parent element height collapse caused by floating, and proposes two methods to clear floating, which are clear attribute and triggering new BFC. The experimental results show that in many new BFC trigger conditions, the .clearfix does not destroy the structure of the document, and also does not add too much code, so it also does well in solving the problem of browser compatibility.
分 类 号:TP312[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:13.59.96.255