摘要
布局是层叠样式表(Cascading Style Sheets,CSS)中的一个重要部分,是页面优化的重要环节之一,其最终目的是搭建完善的页面架构。块级格式化上下文(Block Formatting Contexts,BFC)是页面中的一块渲染区域,它具有自己的一套渲染规则,并且有着与普通容器所没有的特性。文章介绍了BFC的概念、特性及形成条件,论述利用BFC实现页面的自适应布局,使得页面的优化及用户的体验性达到一致。
Layout is an important part of Cascading Style Sheets(CSS), which is one of the important links of page optimization.The ultimate goal of layout is to build a perfect page structure.(Block Formatting Contexts, BFC) is a rendering area in a page table. It has its own set of rendering rules and features that are not available in ordinary containers. In this paper, the concept, characteristics and forming conditions of BFC were introduced, and how to use BFC to realize the adaptive layout of pages was discussed, so that the optimization of pages and the user experience can be improved consistently.
出处
《大众科技》
2019年第2期1-3,共3页
Popular Science & Technology