开发者

Editing css by js in ie giving error

I need to do this:

document.styleSheets[i].rules[1].style.cssText = "cursor: url(images/grabbing.cur), default !important;";

and if I'm 开发者_Python百科checking:

alert(document.styleSheets[i].rules[1].style.cssText);

its giving: cursor: !important

Why is it not setting the whole string in this css?

It's a problem in Internet Explorer only, it works in Firefox.


A simple tipo: there is no ", default" needed.

in css the character "," just uses to seperate items in a list like:

font-family: tahoma, times;

and the cursor property does not accept a serie as value.

the correct form for your css:

cursor: url(images/grabbing.cur) !important;

feather reading: http://www.w3schools.com/css/pr_class_cursor.asp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜