gpt4 book ai didi

css - 带有背景图像和位置的 IE 7 与 js hack

转载 作者:行者123 更新时间:2023-11-28 13:17:50 26 4
gpt4 key购买 nike

我在 IE 7 中使用 js for before hack。它显示类的背景图像。但现在我想定位图像。因为它是 sprite。我不知道为什么它不起作用。下面是我的代码.

JS 破解。 http://jquery.lukelutman.com/plugins/pseudo/

.magento{
list-style-type: none;
margin:0; padding:0;
padding-left: 20px;

}

.magento li:before
{
display: inline-block;
position: absolute;
margin: 9px 0 0 -20px;
min-height: 9px;
background: url(images/bulletsprite.png) no-repeat -116px 0px;
*before: url(images/bulletsprite.png);
*background-position-x: -116px;
*background-position-y:0px;
content:"";
// vertical-align: middle;
width: 9px;
height: 9px;
float:left;
}

HTML代码

<ul class="magento">
<li>
<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nulla sapien, varius id dignissim sit amet, luctus elementum nulla. Mauris hendrerit tincidunt nunc condimentum accumsan. Donec semper hendrerit ligula non blandit. Nullam tellus lacus, dictum quis sodales id, consectetur posuere nunc. Maecenas massa nibh, sagittis quis hendrerit ornare, interdum sit amet tellus. Proin lectus neque, posuere at interdum vitae, eleifend id dui. Mauris eget eros magna, sed gravida quam.</span>
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nulla sapien, varius id dignissim sit amet, luctus elementum nulla. Mauris hendrerit tincidunt nunc condimentum accumsan. Donec semper hendrerit ligula non blandit. Nullam tellus lacus, dictum quis sodales id, consectetur posuere nunc. Maecenas massa nibh, sagittis quis hendrerit ornare, interdum sit amet tellus. Proin lectus neque, posuere at interdum vitae, eleifend id dui. Mauris eget eros magna, sed gravida quam.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nulla sapien, varius id dignissim sit amet, luctus elementum nulla. Mauris hendrerit tincidunt nunc condimentum accumsan. Donec semper hendrerit ligula non blandit. Nullam tellus lacus, dictum quis sodales id, consectetur posuere nunc. Maecenas massa nibh, sagittis quis hendrerit ornare, interdum sit amet tellus. Proin lectus neque, posuere at interdum vitae, eleifend id dui. Mauris eget eros magna, sed gravida quam.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nulla sapien, varius id dignissim sit amet, luctus elementum nulla. Mauris hendrerit tincidunt nunc condimentum accumsan. Donec semper hendrerit ligula non blandit. Nullam tellus lacus, dictum quis sodales id, consectetur posuere nunc. Maecenas massa nibh, sagittis quis hendrerit ornare, interdum sit amet tellus. Proin lectus neque, posuere at interdum vitae, eleifend id dui. Mauris eget eros magna, sed gravida quam.
</li>
</ul>

也仅适用于 IE7 标准模式。为什么背景位置不起作用。相同的代码在 IE8 中运行良好。

最佳答案

IE7 直到 2006 年 10 月才问世。您使用的插件说它最后一次更新是在 2006 年 2 月 6 日。我猜它从未与 IE 5 和 IE 以外的任何东西一起工作6.

关于css - 带有背景图像和位置的 IE 7 与 js hack,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14877549/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com