【问题标题】:Is it possible to change the webkit resizer (pulltab) cursor?是否可以更改 webkit 调整大小(pulltab)光标?
【发布时间】:2014-12-19 18:20:46
【问题描述】:

我已尝试将自定义光标添加到我的 webkit pulltab,但似乎无法使其正常工作。其他元素,比如背景颜色是可变的,但是css的“cursor”属性是不可变的:

#sessionbuilder::-webkit-resizer {
  background: #000;
  cursor: help !important;
}

【问题讨论】:

标签: html css webkit


【解决方案1】:

编辑

嗯,一个简单的 webkit 例子就是这个:

<!DOCTYPE html>
<html>
<head>
<style> 
div {
    width: 100px;
    height: 100px;
    background: red;
    -webkit-transition: width 2s; /* For Safari 3.1 to 6.0 */
    transition: width 2s;
    cursor: wait;
}

div:hover {
    width: 300px;
}
</style>
</head>
<body>

<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>

<div></div>

<p>Hover over the div element above, to see the transition effect with a cursor wait.</p>

</body>
</html>

是的。

见:https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

.foo { cursor: crosshair; }

/* use prefixed-value if "zoom-in" isn't supported */
.bar { cursor: -webkit-zoom-in;  cursor: zoom-in; } 

/* standard cursor value as fallback for url() must be provided (doesn't work without) */
.baz { cursor: url(hyper.cur), auto }

【讨论】:

  • 注:光标:无;在 Firefox 3、Safari 5 和 Chrome 5 之前不支持。在 IE 或 Opera 中完全不支持。 Opera 不支持图像 URL 光标。 IE 或 Opera 不支持以下内容:not-allowed、no-drop、vertical-text、all-scroll、col-resize、row-resize
  • 感谢您的回答。我的问题是关于 ::-webkit-resizer 属性的句柄的。我没有看到使用上述 CSS 样式对光标的任何更改
  • 感谢您的更新。不幸的是,这仍然不是我想要的。
猜你喜欢
  • 1970-01-01
  • 2019-08-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-06-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多