欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
答:使用CSScursor属性
您可以使用CSScursor属性定义自定义光标。该cursor属性采用用户定义的游标值的逗号分隔列表,后跟通用游标。
 
首先,创建光标图像并将其保存为扩展名.gif或.png(对于Firefox,Chrome,Safari)和.cur(对于Internet Explorer)。之后,将cursor属性与指向这些光标图像的URL列表用逗号分隔。最终结束该列表与诸如通用光标default,pointer,help等中所示的下面的例子。
 
例试试这个代码»
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS Custom Cursor</title>
<style>       
    a{
        cursor: url("custom.gif"), url("custom.cur"), default;
    }
</style>
</head>
<body>
    <p>Place your mouse pointer <a href="#">over me</a> to reveal the custom cursor.</p>
</body>
</html>

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h61048.shtml