css属性光标形状

[复制链接]
查看1084 | 回复0 | 2022-6-6 07:00 | 显示全部楼层 |阅读模式
语法:cursor:值
取值:
        text:文本图标  
        help:问号图标
        wait:等待的图标
        pointer:        小手图标
        move 移动
        url(),临时替换的样式-----需要在url后面加auto
        default  箭头
  1. <head>
  2.         <meta charset="utf-8" />
  3.         <title></title>
  4.         <style type="text/css">
  5.                 div{
  6.                         width:100px;
  7.                         height:50px;
  8.                         border:1px solid #000;
  9.                 }
  10.                 .box1{
  11.                         cursor:text;
  12.                 }
  13.                 .box2{
  14.                         cursor:help;
  15.                 }
  16.                 .box3{
  17.                         cursor:wait;
  18.                 }
  19.                 .box4{
  20.                         cursor:pointer;
  21.                 }
  22.                 .box5{
  23.                         cursor:move;
  24.                 }
  25.                 .box6{
  26.                         cursor:url('bitbug_favicon.ico'),auto;
  27.                 }
  28.                 .box7{
  29.                         cursor:default;
  30.                 }
  31.         </style>
  32. </head>
  33. <body>
  34.         <div class="box1">文本</div>
  35.         <div class="box2">问号</div>
  36.         <div class="box3">等待</div>
  37.         <div class="box4">小手</div>
  38.         <div class="box5">移动</div>
  39.         <div class="box6">图片</div>
  40.         <div class="box7">箭头</div>
  41. </body>
复制代码

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

UID
1
贡献
387
丢币
38902
主题
4607
回帖
116
注册时间
2018-9-25
最后登录
2024-4-16