2017-09-24 268 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> 
相關問題