我想这样做:
<div style="float: left;
width: 59px;
background: transparent url('http://download.com/47.jpg') no-repeat scroll -132px -1px;"
class="cIconSmall">
</div>
我想我应该用这个:
$("#YourElementID").css({
float: "left",
width: "59px",
background: "transparent url('http://download.com/47.jpg') no-repeat scroll -132px -1px"
});
有什么想法吗?
谢谢
发布于 2017-02-28 19:22:35
$(".yourClass").css({
float: "left",
width: "59px",
background: "transparent url('http://download.com/47.jpg') no-repeat scroll -132px -1px"
});
发布于 2019-08-16 01:39:00
我发现Andrew Lohr在接受的解决方案中的评论肯定是我在我的脚本中工作的唯一方法:$('#selector').css({'property': 'val','property': 'val'});
(谢谢Andrew)。
https://stackoverflow.com/questions/5720813
复制相似问题