鼠标悬浮出现十字架形鼠标指针
分类:实例代码
分享一段代码实例,它实现了鼠标悬浮,出现十字架形状指针效果。
代码实例如下:
<!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;
一线大厂高级前端编写,前端初中阶面试题,帮助初学者应聘,需要联系微信:javadudu