鼠标划上之cursor

12 篇文章 0 订阅
10 篇文章 0 订阅

用户在使用浏览器查看页面时,许多鼠标划上的操作可以提升用户体验度。
比如在默认的文字上显示的是光标,在可点击的链接处显示的是手型,可以说这两种使我们最为常用的显示方式。

但除了这些之外,还有许多的鼠标划上显示方式,如下如:
这里写图片描述

对应于cursor可以使用的值都在上面的表格中,这里是一段示例代码,大家可以复制感受一下。


<!DOCTYPE html>
<html>
<head>
    <title>cursor</title>
    <style type="text/css">
        div {
            width: 500px;
            height: 32px;
            margin: 3px auto;
            padding: 2px;
            border: 1px solid #eee;
            background: #f0f0f0;
            line-height: 32px;
        }
    </style>
</head>
<body>
    <p>请把鼠标移动到单词上,可以看到鼠标指针发生变化:</p>
    <div style="cursor:auto">Auto</div>
    <div style="cursor:crosshair">Crosshair</div>
    <div style="cursor:default">Default</div>
    <div style="cursor:pointer">Pointer</div>
    <div style="cursor:move">Move</div>
    <div style="cursor:e-resize">e-resize</div>
    <div style="cursor:ne-resize">ne-resize</div>
    <div style="cursor:nw-resize">nw-resize</div>
    <div style="cursor:n-resize">n-resize</div>
    <div style="cursor:se-resize">se-resize</div>
    <div style="cursor:sw-resize">sw-resize</div>
    <div style="cursor:s-resize">s-resize</div>
    <div style="cursor:w-resize">w-resize</div>
    <div style="cursor:text">text</div>
    <div style="cursor:wait">wait</div>
    <div style="cursor:help">help</div>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值