HTML页面中的连字符列表在IE 8中不起作用(Hyphen List in HTML page is not working in IE 8)

编程入门 行业动态 更新时间:2024-10-08 19:40:09
HTML页面中的连字符列表在IE 8中不起作用(Hyphen List in HTML page is not working in IE 8)

以下代码在IE 8中不起作用,除了这个浏览器,它在所有浏览器中都有效。 任何人都可以帮我解决这个问题吗?

CSS

ul.hyphen-list { list-style-type: none; margin-left: 1.5em; padding-left: 1em; text-indent: -0.85em; } ul.hyphen-list li:before { content: "- "; }

HTML

<ul class="hyphen-list"> <li>This is line 1<br/>part 2</li> <li>This is line 2</li> </ul>

The below code is not working in IE 8, other than this browser it's working in all browsers. Can anyone help me how to fix this?

CSS

ul.hyphen-list { list-style-type: none; margin-left: 1.5em; padding-left: 1em; text-indent: -0.85em; } ul.hyphen-list li:before { content: "- "; }

HTML

<ul class="hyphen-list"> <li>This is line 1<br/>part 2</li> <li>This is line 2</li> </ul>

最满意答案

ul.hyphen-list { list-style: none; }

在IE8中的浏览器堆栈上测试; 工作得很好 - http://jsfiddle.net/9RGeB/7/

http://jsfiddle.net/9RGeB/7/show/

请记住:IE 7不支持:之前

http://css-tricks.com/browser-support-pseudo-elements/

ul.hyphen-list { list-style: none; }

tested on browser stack in IE8; works just fine - http://jsfiddle.net/9RGeB/7/

http://jsfiddle.net/9RGeB/7/show/

Remember: IE 7 does not support :before

http://css-tricks.com/browser-support-pseudo-elements/

更多推荐

本文发布于:2023-08-07 11:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464148.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中不   字符   页面   列表   HTML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!