1

所以在我的页面上,我有一个由 jQuery 修改的选择菜单。简单地说,jQuery 采用样式属性并将它们附加到列表中。除了通过 PHP 生成的背景图像外,一切正常。在 Chrome 中看起来很棒,这一切都很好,但 IE/Safari 不显示任何图像。它以 background-image:none 的形式出现;

页面在这里:

http://stickeraddicts.com/index.php?_a=lettering-tool

它应该看起来像我主页上的 gif。同样,在 Chrome 中,事情是完美的。问题主要是IE。

无论如何,这是列表项的 HTML

<option style="background-image:url(/letteringtool/fontpreview.php?txt=Alba%20Super&color=ffffff&font=/fonts/alba.ttf&width=200&height=25&padding=10);text-indent:-9999px;" value="alba">Alba Super</option>

这是影响它的jQuery(在jQtransform内部)

var oLi = $('<li style="border-bottom:1px solid #CCC; background-repeat:no-repeat; background-color: rgb(153, 153, 153); background-image:'+ $(this).css('backgroundImage')+';text-indent:'+$(this).css('text-indent')+';"><a href="#" index="'+ i +'">'+ $(this).html() +'</a></li>');
$ul.append(oLi);
4

0 回答 0