【发布时间】:2020-08-17 03:55:37
【问题描述】:
当光标在#square 内时,我想将光标更改为 SVG。我在下面尝试通过缩小 SVG 并在 CSS 中设置 cursor 值,但是,我得到了错误:
无效的属性值
我在这里做错了什么?非常感谢任何帮助。
#square {
height: 250px;
width: 250px;
background-color: yellow;
cursor: url("data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' height='16' width='16' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8'/%3E%3C/svg%3E");
}
<div id="square"></div>
【问题讨论】: