简体   繁体   English

Safari/Firefox 和 Chrome 中的 CSS 不同

[英]CSS different in Safari/Firefox and Chrome

I'm having issues with indent formatting in Chrome.我在 Chrome 中遇到缩进格式问题。 I have set the indent to be -14px, so that the text lines up.我已将缩进设置为 -14px,以便文本对齐。 This works fine in Safari and Firefox Developer Edition, however does not seem to work in Chrome.这在 Safari 和 Firefox Developer Edition 中运行良好,但在 Chrome 中似乎不起作用。 Chrome is detecting the class and the indent, but it somehow needs -30px for the text to be lined up correctly. Chrome 正在检测类和缩进,但它以某种方式需要 -30px 才能正确排列文本。

Please see the "Rubriky" section in the accordion for reference:请参阅手风琴中的“Rubriky”部分以供参考:

http://marianrehak.cz/dcd/reseller-magazine-online/ http://marianrehak.cz/dcd/reseller-magazine-online/

Do you have any suggestions?你有什么建议吗?

You need to have your list position property set to outside.您需要将列表位置属性设置为外部。 This will by default sit the bullets to the left of the list items with an indent.默认情况下,这会将项目符号放在带有缩进的列表项的左侧。 So list-style: outside;所以list-style: outside; will solve this.将解决这个问题。

 .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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM