<峰; br>不会在Chrome上造成新行 [英] <br> not causing new line on Chrome
问题描述
通过添加 ZERO WIDTH SPACE 到容器元素,如下所示:
div:after {content:'\0200B'; }
这确保了最后一个< br>之后会有一些内容;
发生,有效地进入新行。无需添加/更改任何DOM。
I have some <span>
elements which are inline-block
and after the last <span>
I have a <br>
to break a new line (could be more than just one <br>
).
The new line works on Firefox but doesn't work on Chrome (v. 24). Don't know why.
I write this so people who are searching the internet would have something to read regarding this matter, because I did not find anything on google/stackoverflow regarding this.
Solved: http://jsbin.com/ezatoy/32/edit
By adding a ZERO WIDTH SPACE to the container element like so:
div:after{ content:'\0200B'; }
This insures that there will be some content after the last <br>
occurrence, effectively breaking into a new line. no need to add/change any DOM.
这篇关于<峰; br>不会在Chrome上造成新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!