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.
精彩评论