2017-09-24 261 views
0
li.Log-In { 
    margin-left: 20px; 
    text-transform: uppercase; 
} 
li.Log-In:hover { 
    margin-left: 20px; 
    text-transform: uppercase; 
    cursor: hand; 
} 

当我测试一下,当我将鼠标悬停上面登录它不改变光标手为什么:悬停在这个CSS代码不起作用?

+0

变化''光标:hand''到''光标:指针;''' –

+1

光标:手'让我大声笑哈哈 – Dummy

+0

光标:手真的? –

回答

6

你不需要添加:悬停实现这一目标。而对于手形光标的名字是不是 '手' 它只是 '指针' 试试这个:

 li.Log-In { 
     margin-left: 20px; 
     text-transform: uppercase; 
     cursor: pointer; 
     } 
+0

哈!我从来没有想过这是疯狂的 - 光标只与悬停有关,因此不需要“悬停”。我写过'.myClass:hover {cursor:pointer; ''多年! – wunth

-1
Try this fun thing with hover!! :) 

<!DOCTYPE html> 
<head> 
    <title>Hover</title> 
</head> 

<style type="text/css"> 

#box{ 
width: 10em; 
height: 10em; 
background: #666; 
margin: 2em auto; 
box-shadow: 0 .2em .4em rgba(0,0,0,0.3); 
-webkit-transition:all ease-in .2s; 
-o-transition:all ease-in .2s; 
-moz-transition:all ease-in .2s; 
-ms-transition:all ease-in .2s; 
transition:all ease-in .2s; 
cursor: pointer; 
/*cursor: wait;*/ 
} 

#box:hover{ 
border-radius: .5em; 
background: #13a58e; 
box-shadow: 0 .5em .3em rgba(0,0,0,0.5); 
margin: .3em auto; 
} 

</style> 

<body> 

<div id="box"></div> 

</body> 

</html> 
相关问题