当前位置:  首页  >  PHP资讯  >  业界资讯

clear在css中什么意思

clear在css中有清除、清理的意思,也是CSS中的一个属性,用于清除浮动,其使用语法如“img{float:left;clear:both;}”,该语句表示图像的左侧和右侧均不允许出现浮动元素。

clear在css中有清除、清理的意思,也是CSS中的一个属性,用于清除浮动,其使用语法如“img{float:left;clear:both;}”,该语句表示图像的左侧和右侧均不允许出现浮动元素。

示例:

      

没有清除浮动!This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.

没有清除浮动!This is also some text. This is also some text. This is also some text. This is also some text. This is also some text. This is also some text.




没有清除浮动!This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.

清除浮动!This is also some text. This is also some text. This is also some text. This is also some text. This is also some text. This is also some text.

效果图:

以上就是clear在css中什么意思的详细内容,更多请关注其它相关文章!

内容推荐:免费高清PNG素材下载
吐了个 "CAO" !
扫码关注 PHP1 官方微信号
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved PHP1.CN 第一PHP社区 版权所有 京ICP备19059560号-4