如果li
里面有div
滚动条,则ol li
号码无效。
但是,相同的代码ol li
号已经在FF浏览器上运行。
ol li
的数字为那是什么问题?我试过但没有得到解决方案。
答案 0 :(得分:0)
请参阅它会帮助您的链接。 http://codepen.io/nehemc/pen/dXWZbp
ol {
width:150px
}
ol li {
padding-left:30px;
margin-left:0px;
display: list-item;
list-style-position: inside;
}
div {
width:100px;
overflow-x:scroll;
white-space:nowrap;
}
答案 1 :(得分:0)
因为您使用了overflow-x:scroll
请检查jsfiddle:https://jsfiddle.net/awdmb6s1/
ol {
counter-reset: section;
list-style-type: none;
width:150px
}
li{
padding-left:30px;
position:relative;
list-style:none
}
li:before {
counter-increment: section;
content: " "counter(section) ". ";
position: absolute;
left: 0;
}
div{
width:100px;
overflow-x:scroll;
white-space: nowrap;
}
答案 2 :(得分:0)
在vertical-align: top;
标记&中的css div
,li
中添加此属性删除填充到ol{
width:150px;
}
ol li{
padding-left:20px;/*remove this property*/
margin-left:20px;
}
div{
width:100px;
overflow-x:scroll;
white-space:nowrap;
display: inline-block;
vertical-align: top;
}
标记
<ol>
<li><div> Lorem Ipsum is simply dummy text of the printing and typesetting </div> </li>
<li><div> Lorem Ipsum is simply dummy text of the printing and typesetting </div> </li>
<li><div> Lorem Ipsum is simply dummy text of the printing and typesetting </div> </li>
</ol>
&#13;
<select>
&#13;