问题
Question. Is it possible to add an extra line break between list items. par exemple
My current situation. I'm using Rails with bootstrap.
<h1> Things I like </h1>
<ol>
<li> Apples </li><br>
<li> Bananas </li><br>
</ol>
I want that extra line break between my list items but I don't want to have to do the br tag between each. Is it possible through CSS or some special bootstrap class to take care of that?
回答1:
In your CSS file:
li {
margin-bottom: 10px;
}
You can modify the accessor ("li") or the value as you need.
回答2:
li {
margin: 0 0 20px 0;
}
for top, right, bottom, left
or
li{
margin: 10px 0;
}
for top&bottom, left&right
or just
li {
margin-bottom: 20px;
}
来源:https://stackoverflow.com/questions/56138596/extra-line-break-between-ordered-list-items