我有一个无序的HTML列表(ul
)。如果第二个单词太长,行会自动换行,但溢出的文本不会缩进。有什么解决办法吗?
然后点击“Leistungen”,再点击“KINDERZAHNHEILKUNDE”。现在你知道我的意思了。
可能是因为CSS的原因,我不确定。
用padding替换缩进
padding-left: 2em;
text-indent: -2em;
应该可以解决问题。
为了实现有序列表和多行缩进,我遵循了以下CSS:
.surveyorderedlist{
ol{
list-style-position: outside;
}
li{
margin-bottom:5px;
margin-left:40px;
padding-left:8px;
}
}
然后你的HTML应该如下:
<div class="surveyorderedlist">
<span><b>Conditions imposed</b></span>
<ol>
<li>Names and addresses are accessed only by the Financial Service Provider on its own behalf, and solely for its own use;</li>
<li>Names and addresses may only be accessed for a specified purpose;</li>
<li>The fees charged for the provision of the names and addresses from the Motor Vehicle Register (MVR) are duly paid;</li>
<li>Any instances of unauthorised access must immediately be notified to the Secretary for Transport and the Privacy Commissioner; </li>
</ol>
</div>