鼠标悬浮出现十字架形鼠标指针

快乐打工仔 分类:实例代码

分享一段代码实例,它实现了鼠标悬浮,出现十字架形状指针效果。

代码实例如下:

<!DOCTYPE html>
<html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://www.pipipi.net/" />
<title>前端教程网</title>
<style type="text/css">
div{
  width:100px;
  height:100px;
  margin:0px auto;
  cursor:crosshair;
  background:green;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

上面的代码实现了我们的要求,核心代码是:

cursor:crosshair;

回复

我来回复
  • 暂无回复内容