您需要將列表位置屬性設置爲外部。默認情況下,將這些項目符號放在列表項左側的縮進處。 因此list-style: outside;
將解決這個問題。
.mytest {
list-style: square outside;
}
<ul class="mytest">
<li>bal 1</li>
<li>bal 2 add her come lot of test so we get line wrap, add her come lot of test so we get line wrapadd her come lot of test so we get line wrap, add her come lot of test so we get line wrapadd her come lot of test so we get line wrap, add her come lot of test so we get line wrapadd her come lot of test so we get line wrap, add her come lot of test so we get line wrapadd her come lot of test so we get line wrap, add her come lot of test so we get line wrapadd her come lot of test so we get line wrap, add her come lot of test so we get line wrapadd her come lot of test so we get line wrap, add her come lot of test so we get line wrapadd her come lot of test so we get line wrap, add her come lot of test so we get line wrap</li>
<li>bal 3</li>
<li>bal 4</li>
<li>bal 5</li>
<li>bal 6</li>
<li>bal 7</li>
<li>bal 8</li>
<li>bal 9</li>
<li>bal 10</li>
<li>bal 11</li>
</ul>
我不會在這裏使用文本縮進可言,而只是'列表樣式位置:outside' – CBroe
不要SO共享外部鏈接。粘貼這裏複製你的問題的相關代碼 –