我的代码是这样的:
<a href="javascript:void(0)" id="Pencil_a" class="Pencil"></a>
脚本:
<script type="text/javascript">
$(document).ready(function () {
$("#Pencil_a").click(function () {
$("body").addClass("pencil_cursor");
});
});
</script>
风格:
.Pencil
{
background-image: url("images/globaleImg.png");
background-position: -88px -415px;
display: block;
height: 15px;
position: relative;
width: 15px;
}
.pencil_cursor
{
cursor:url("images/globaleImg.png") -88px -415px;
display:block;
}
当我点击链接时,光标不会改变它的默认图像我做错了什么?