简体   繁体   English

带有背景图像的有序列表在IE10,IE11中无法正确显示

[英]ordered list with background image not displaying correctly in IE10, IE11

I have a following HTML code on my webpage to create a list 我的网页上有以下HTML代码来创建列表

<ul class="rightdivul">
               <li id="linkedinli">
                   <a href="https://www.linkedin.com/in/xxxxxx">www.linkedin.com/in/xxxxxx</a>
               </li>



               <li id="twitterli">
                   <a href="https://twitter.com/xxxxx">@xxxxxx</a>
               </li>

           </ul>

I am using the following CSS to style this: 我正在使用以下CSS设置样式:

ul.rightdivul {
text-align: left;
list-style-type: none;
font-weight: 300;
padding-left: 20px;
font-weight: 300;
color: #23313E;

}

#linkedinli {
background: url(images/Linkedin.svg) no-repeat;
padding-left: 30px;
margin-bottom: 15px;


}

#twitterli {
background: url(images/Twitter.svg) no-repeat;
padding-left: 30px;
margin-bottom: 3px;

}

In Chrome, Firefox, Opera, Safari, Edge the background image is displayed correctly before the text. 在Chrome,Firefox,Opera,Safari,Edge中,背景图片会在文本之前正确显示。 However in IE10, IE11 the background image is overlapping the text. 但是,在IE10,IE11中,背景图像与文本重叠。 Am I missing something here? 我在这里想念什么吗?

Try writing this: 尝试这样写:

background: url(/*your url*/);
background-repeat: no-repeat;

Instead of this: 代替这个:

background: url(/*your url*/) no-repeat;

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

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