我需要这样做:
document.styleSheets[i].rules[1].style.cssText = "cursor: url(images/grabbing.cur), default !important;";如果我检查的话:
alert(document.styleSheets[i].rules[1].style.cssText);它的给予:cursor: !important
为什么不在这个css中设置整个字符串?
这只在Internet Explorer中有问题,它在Firefox中有效。
发布于 2010-04-30 23:20:01
一个简单的提示:不需要",default“。
在css中,字符",“只是用来分隔列表中的项,如下所示:
font-family: tahoma, times;且cursor属性不接受序列作为值。
css的正确表单:
cursor: url(images/grabbing.cur) !important;https://stackoverflow.com/questions/2744913
复制相似问题