微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

CSS表单3 光标样式 (每个位置鼠标放上去的样式不同)

<!DOCTYPE html>
< html >
     < head >
         < title >单选按钮对齐</ title >
         < style type = "text/css" >
             a{display:block}
             a.aut{cursor:auto}
             a.crosshair{cursor:crosshair}
             a.default{cursor:default}
             a.pointer{cursor:pointer}
             a.move{cursor:move}
             a.text{cursor:text}
             a.wait{cursor:wait}
             a.help{cursor:help}
         </ style >     
     </ head >
     < body >
     < h1 >软件开发,成就梦想</ h1 >
     < h2 >学编程,上利永贞网 https://www.liyongzhen.com/</ h2
     < a class = "auto" >auto</ a >
     < a class = "crosshair" >crosshair</ a >
     < a class = "default" >default</ a >
     < a class = "pointer" >pointer</ a >
     < a class = "move" >move</ a >
     < a class = "text" >text</ a >
     < a class = "wait" >wait</ a >
     < a class = "help" >help</ a >
     </ body >
</ html >
 

cursor 属性有不同的值,这些值让光标显示不同的形状。

常见的形状有:

属性 说明
default 认光标,通常是一个箭头
auto 浏览器自动识别的光标
crosshair 十字线
pointer 手型指针
move 移动指针
text 文本指针
wait 指示程序正忙
col-resize 双向移动
help 帮助指针

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。