CSS中怎样更改鼠标样式,有哪些可挑
发布时间:2023-09-19 15:28:13 所属栏目:语言 来源:
导读:在css中,可以利用cursor属性来改变鼠标正常选择时的样式,cursor属性的作用是定要显示的光标的类型(形状)。该属性定义了鼠标指针放在一个元素边界范围内时所用的光标形状。
示例如下:
<!DOCTYPE html>
示例如下:
<!DOCTYPE html>
在css中,可以利用cursor属性来改变鼠标正常选择时的样式,cursor属性的作用是定要显示的光标的类型(形状)。该属性定义了鼠标指针放在一个元素边界范围内时所用的光标形状。 示例如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> .div1{ width:100px; height:100px; border:1px solid #000000; cursor:pointer; } .div2{ width:100px; height:100px; border:1px solid #000000; cursor:wait; } .div3{ width:100px; height:100px; border:1px solid #000000; cursor:move; } .div4{ width:100px; height:100px; border:1px solid #000000; cursor:text; } </style> </head> <body> <div class="div1"></div> <div class="div2"></div> <div class="div3"></div> <div class="div4"></div> </body> </html> (编辑:聊城站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐