Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 我是否应该将游标:指针添加到伪类:hover?_Css_Pseudo Class - Fatal编程技术网

Css 我是否应该将游标:指针添加到伪类:hover?

Css 我是否应该将游标:指针添加到伪类:hover?,css,pseudo-class,Css,Pseudo Class,我不知道,我应该用什么 .myclass { cursor: pointer; } 或 或者没有区别?没有区别-。使用你想要的任何东西。我会使用第一个,因为它可以节省几行CSS 否则,您可以为所有其他伪类指定不同的指针 比如: a:link{cursor:pointer;} /* you still dont need it ... as it's default*/ a:hover{cursor:crosshair;} a:active:{cursor:wait;} a:visited{

我不知道,我应该用什么

.myclass {
  cursor: pointer;
}


或者没有区别?

没有区别-。

使用你想要的任何东西。
我会使用第一个,因为它可以节省几行CSS

否则,您可以为所有其他伪类指定不同的指针

比如:

a:link{cursor:pointer;} /* you still dont need it ... as it's default*/
a:hover{cursor:crosshair;}
a:active:{cursor:wait;}
a:visited{cursor:wait;}

我发现,如果需要支持IE7,如果带有样式化光标的元素靠近页面底部,则使用:hover伪类会导致页面不稳定地跳转。我建议不要使用:hover,因为没有它CSS可以正常工作。

听起来很合理,没有区别。我不会把它放在悬停状态,我会考虑其他的伪类。。例如,for:activecursor可能是默认值(如果我添加cursor:special only for:hover)。但对于提交和按钮很有用。
a:link{cursor:pointer;} /* you still dont need it ... as it's default*/
a:hover{cursor:crosshair;}
a:active:{cursor:wait;}
a:visited{cursor:wait;}