css用户界面-鼠标样式

鼠标样式:cursor
语法:
li{
curson: pointer;
}
属性值: 描述
default 小白、默认
pointer 小手
move 移动
text 文本
not-allowed 禁止
代码例子:建立5个盒子,给他们指定不同的属性

    <style>
        li{
            list-style: none;
            display: inline-block;
            width: 100px;
            height: 100px;
        }
        .a1{
            background-color: red;
            cursor: default;
        }
        .a2{
            background-color: green;
            cursor: pointer;
        }
        .a3{
            background-color: blue;
            cursor: move;
        }
        .a4{
            background-color: rgb(204, 255, 0);
            cursor: text;
        }
        .a5{
            background-color: darkolivegreen;
            cursor:not-allowed;
        }
    </style>
</head>
<body>
    <li class="a1">小白、默认</li>
    <li class="a2"> 小手</li>
    <li class="a3">移动</li>
    <li class="a4">文本</li>
    <li class="a5">禁止</li>
</body>  

运行结果:
在这里插入图片描述
鼠标放上去会有不同的样式,但截屏不好实现。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值