作者:浐灞半岛商业_318 | 来源:互联网 | 2021-11-15 21:57
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中什么意思的详细内容,更多请关注其它相关文章!