2013-04-20 98 views
0

是否可以在網頁上創建一個透明的HTML光標?我使用一個div作爲一個光標,我想使DIV 50%透明:http://jsfiddle.net/mCgmP/16/創建一個透明的HTML光標

<div id="cursor"><font size="6">I want this cursor to be 50% transparent!</font></div> 
+0

似乎有人將此問題複製到他們的博客上:http://www.blogosfera.co.uk/2013/04/create-a-transparent-html-cursor/ – 2013-04-20 14:59:29

回答

2

也許這將有助於:

#cursor 
{ 
opacity:0.4; 
filter:alpha(opacity=40); /* For IE8 and earlier */ 

} 

Here's a working demo

0

也許你正在尋找:

#cursor{background:rgba(255,255,255,0.5);} 

包括文字:

#cursor{background:rgba(255,255,255,0.5);color:rgba(255,255,255,0.5);} 
+0

這會使整個div透明嗎?它只會讓div的背景透明嗎?實際上我試圖找到一種方法來使整個遊標變得透明(包括遊標的背景)。 – 2013-04-20 05:08:32

+0

文字也? #cursor {背景:RGBA(255,255,255,0.5);顏色:RGBA(255,255,255,0.5);} – daniel 2013-04-20 05:09:49