我对 Safari 上-webkit-grabbing
的{{1}} css参数有不同的行为。它仅适用于cursor
元素,而不适用于<button
:
<div>
.a {
background-color: green;
width: 200px;
height: 200px;
}
.b {
background-color: yellow;
width: 200px;
height: 200px;
}
.grab {
cursor: grab;
cursor: -moz-grab;
cursor: -webkit-grab;
}
.grab:active {
cursor: grabbing;
cursor: -moz-grabbing;
cursor: -webkit-grabbing;
}
对于 Chrome 和 Firefox ,它可以正常运行。
答案 0 :(得分:0)
禁用用户选择解决了我的问题:
...
.grab {
cursor: grab;
cursor: -moz-grab;
cursor: -webkit-grab;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Chrome/Safari/Opera */
-khtml-user-select: none; /* Konqueror */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
not supported by any browser */
}
...