概述
The In the past, this approach would most often have been used to stop content wrapping around a right- or left-aligned image or table. 过去,这种方法最常用于停止围绕右或左对齐的图像或表格进行内容环绕。 The correct way of managing alignment issues is to use the CSS 解决对齐问题的正确方法是使用CSS Note that you should avoid inline CSS styles—the inline style above is provided for direct comparison purposes only. 请注意,您应该避免使用内联CSS样式-上面的内联样式仅用于直接比较。 This example shows a 此示例显示了一个 翻译自: https://www.sitepoint.com/clear-html-attribute/ 描述 (Description)
clear
attribute is a deprecated (presentational) attribute that’s used to clear any preexisting right or left alignments. It ensures that the content after the br
element appears beneath the baseline of the previously aligned element; the br
doesn’t just create a line break in the content that’s flowing around the right- or left-aligned element.clear
属性是不推荐使用的(表示性)属性,用于清除任何先前存在的右对齐或左对齐。 它确保br
元素之后的内容出现在先前对齐的元素的基线之下; br
不仅会在围绕右对齐或左对齐元素的内容中创建换行符。 float
property, rather than the HTML align
attribute. To clear elements, we use the CSS clear
property like so:float
属性,而不是HTML align
属性。 为了清除元素,我们使用CSS clear
属性,如下所示: <br clear="left"/> the old-fashioned HTML way
<br style="clear:left;"/> the CSS way
例 (Example)
br
with which a clear
attribute is used to take content below a right-aligned image:br
,使用br
时, clear
属性用于获取右对齐图像下方的内容: <p><img src="pool.jpg" alt="sitting by the pool" align="right"/>
The rest of the day was a lazy one, partly spent by the complex
pool, partly inside watching British TV, but we couldn't be doing
this for the rest of the holiday. Already we were missing having
the car!
<br clear="all"/>
I decided to check out what the weather would be doing for the next
few days, as that would help us make any decisions about future
excursions.
</p>
最后
以上就是可爱凉面为你收集整理的清除(HTML属性)的全部内容,希望文章能够帮你解决清除(HTML属性)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复