将类应用于br标签? [英] Apply a class to a br tag?
本文介绍了将类应用于br标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下有效的HTML?
Is the following valid HTML?
<br class="something">
作为一个HTML元素,我不明白为什么它不会,但是我没有以为我见过它在使用。
As an HTML element I can't see why it wouldn't be, but I don't think I've ever seen it in use.
推荐答案
我可以考虑的一个应用是使用伪元素,比如:
或:在
之后,例如在horizotal行下添加一些文本:
One application I can think off is adding using it with pseudo-elements, such as :before
or :after
, for instance adding some text beneath a horizotal line:
hr.something:after { content: "Some text" }
这篇关于将类应用于br标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文