开发者

force a <br /> at end of div

I'm wondering is there开发者_开发问答 a way of doing the following using CSS alone. When </div> is called on a specific div that a <br /> would be added.


If you're looking to create a gap below your <div>, in most cases giving it a bottom margin will do the trick:

#some-div {
    margin-bottom: 1em; /* Adjust depending on your text's line-height */
}


div:after {
    content: '<br />';
}

Doesn't do what you want it to do, but it does literally.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜