css - float 和列表样式位置 : inside, 在最新的 chrome 中不起作用?

标签 css html

我刚刚收到客户发来的一封电子邮件,他网站上的一些列表元素一夜之间就损坏了? 过去几个月我没有更改任何代码,当我尝试这个简单的代码时: Firefox 和 IE 确实尊重 list-style-position: inside;在 float 列表元素上,但现在 Chrome 不这样做?!有解决办法吗?这是一个错误还是一个新标准? (Html5 DTD)

My Fiddle

<style>    
ul {
    list-style-position: inside;
    width:150px;
}

li {
    background:#c9c9c9;
    float:left;
    clear:both;
}
</style>


<div class="wrapper">
    <ul>
        <li><a href="#">Product1</a></li>
        <li><a href="#">Product2</a></li>
    </ul>
    <div class="clear"></div>
</div>

最佳答案

是的,这是一个错误。 检查this page .

关于css - float 和列表样式位置 : inside, 在最新的 chrome 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19157408/

相关文章:

html - 创建一个草率的元素

html - 省略号在 CSS 网格布局中不起作用

html - 默认的 css 空选择器?

html - 使 div 在一行上水平排列

javascript - 挤压文本以适合 CSS

HTML/CSS : absolute positioning of elements within <fieldset>

css - 使用 Flexbox 的完整内容高度和对齐卡片

html - 元素之间的 CSS3 Flexbox 间距

html - css 样式列表中有一个漏洞,但为什么呢?

html - 响应式 div 扩展到另一个 div