十、鼠标指针(cursor)详解

243 阅读1分钟

鼠标指针(cursor)详解

  1. cursor: pointer;
    • wait(转圈)
    • move(可移动)
    • crosshair (十字架)
    • help(帮助)
    • not-allowed(禁用)
    • pointer(手)
    • url(""),pointer; 注意: 大小不能大于32 * 32(切记)
<!DOCTYPE html>
<html lang="zn-CH">
<head>
    <meta charset="UTF-8">
    <title>Rock学前端</title>
    <style>
        div {
            width: 500px;
            height: 300px;
            background: palegreen;
            cursor: url("./logo.png"), pointer; /*wait(转圈) move(可移动) crosshair(十字架) help(帮助) not-allowed(禁用) pointer(手)*/
        }
    </style>
</head>
<body>
<div class="container">
    <h2>
        鼠标相关的属性
    </h2>
    <label>
        <input type="text" name="userName">
    </label>
    <a href="www.baidu.com">baidu</a>

</div>
</body>
</html>