忽略< br>与CSS? [英] Ignore <br> with CSS?
本文介绍了忽略< br>与CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在一个网站上工作,在一些标题中插入了< br>
。假设我不能编辑源HTML,有一种方法与CSS我可以忽略这些休息?
I'm working on a site which has line breaks inserted as <br>
in some of the headings. Assuming I can't edit the source HTML, is there a way with CSS I can ignore these breaks?
我是移动网站优化,因此我不想使用JavaScript。
I'm mobile optimising the site so I don't really want to use JavaScript.
推荐答案
使用css,你可以隐藏br标签,它们不会有效果:
With css, you can "hide" the br tags and they won't have an effect:
br {
display: none;
}
如果您只想隐藏特定标题类型中的一些, css更具体。
If you only want to hide some within a specific heading type, just make your css more specific.
h3 br {
display: none;
}
这篇关于忽略< br>与CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文