简体   繁体   English

有条件的CSS无法正常工作?

[英]conditional css not working correctly?

i have used condition css for internet explorer to show the auto cursor in internet explore but it is not working correctly i have used following code to link the 我已使用Internet Explorer的条件CSS来显示Internet Explorer中的自动光标,但它无法正常工作,我已使用以下代码链接了

<!--[if IE]><link rel="stylesheet" href="newstyle_ie.css" media="screen" type="text/css" /><![endif]-->  

i have to show the default cursor in internet explore for that i uses 我必须在Internet Explorer中显示我使用的默认光标

body{ cursor:auto !important;} 正文{cursor:auto!important;}

and for other browsers i have used 和其他我使用过的浏览器

body{ cursor:url("some url");} body {cursor:url(“ some url”);}

any hint ??? 任何提示?

Your conditional comment is ok, you should check the cursor url, and set a fallback value(ie pointer, separated with a comma), just in case the first cursor isn't found. 您的条件注释还可以,您应该检查光标的URL,并设置一个后备值(即指针,用逗号分隔),以防万一找不到第一个光标。 Also check the path to css file 还要检查css文件的路径

Try this: 尝试这个:

body {
    cursor:  auto;
    cursor:  url(url path), auto;
}

or 要么

$(document).ready(function(){
    $("body").css('cursor','url(your url),auto');
});

Please try to use hack css for browser to fix your issue . 请尝试使用用于浏览器的hack css来解决您的问题。 Please refer this link http://css-tricks.com/how-to-create-an-ie-only-stylesheet/ how to call hack css. 请参考此链接http://css-tricks.com/how-to-create-an-ie-only-stylesheet/如何调用hack CSS。

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM