无法使用自定义光标

时间:2017-08-01 13:52:09

标签: html css cursor

我正在尝试使用带有网址代码的自定义光标,但似乎它无效。以下是我尝试使用的光标的链接:http://www.rw-designer.com/cursor-detail/43903

段:

.dropbtn {
  background-color: rgba(0, 0, 0, 0.0);
  font-family: 'Montserrat', sans-serif;
  color: white;
  padding: 5px;
  font-size: 14px;
  border: none;
  cursor: url(http://www.rw-designer.com/cursor-extern.php?id=43903), auto;
}
<div class="dropdown">
  <button onclick="myFunction()" class="dropbtn">&#8883;Featured&#8882;</button>
  <div id="myDropdown" class="dropdown-content">
    <a href="walnutwetbar.html">Walnut Wetbar</a>
    <a href="woodandsteel.html">Wood and Steel</a>
    <a href="bluestainpine.html">Blue Stain Pine Changing Table</a>
    <a href="dualityguitar.html">Duality Guitar</a>
  </div>
</div>

2 个答案:

答案 0 :(得分:1)

您需要在为自定义光标指定的图像路径后添加, auto

&#13;
&#13;
.dropbtn {
  background-color: rgba(0, 0, 0, 0.0);
  font-family: 'Montserrat', sans-serif;
  color: white;
  padding: 5px;
  font-size: 14px;
  border: none;
  cursor: url(http://www.rw-designer.com/cursor-extern.php?id=43903), auto;
}
&#13;
<div class="dropdown">
  <button onclick="myFunction()" class="dropbtn">&#8883;Featured&#8882;</button>
  <div id="myDropdown" class="dropdown-content">
    <a href="walnutwetbar.html">Walnut Wetbar</a>
    <a href="woodandsteel.html">Wood and Steel</a>
    <a href="bluestainpine.html">Blue Stain Pine Changing Table</a>
    <a href="dualityguitar.html">Duality Guitar</a>
  </div>
</div>
&#13;
&#13;
&#13;

答案 1 :(得分:1)

超级关闭,只需在光标末尾添加“自动”一词即可。 IE: cursor:url(http://www.rw-designer.com/cursor-extern.php?id=43903),auto;

https://jsfiddle.net/ttngcLgf/

.dropbtn {
  background-color: black;
  font-family: 'Montserrat', sans-serif;
  color: white;
  padding: 5px;
  font-size: 14px;
  border: none;
  cursor: url(http://www.rw-designer.com/cursor-extern.php?id=43903),auto;
}
<div class="dropdown">
  <button onclick="myFunction()" class="dropbtn">&#8883;Featured&#8882;</button>
  <div id="myDropdown" class="dropdown-content">
    <a href="walnutwetbar.html">Walnut Wetbar</a>
    <a href="woodandsteel.html">Wood and Steel</a>
    <a href="bluestainpine.html">Blue Stain Pine Changing Table</a>
    <a href="dualityguitar.html">Duality Guitar</a>
  </div>
</div>