Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 禁用链接<;a>;内部<;李>;_Html_Css - Fatal编程技术网

Html 禁用链接<;a>;内部<;李>;

Html 禁用链接<;a>;内部<;李>;,html,css,Html,Css,我有以下HTML: <li> <a href="mylink">Some text</a> </li> 我也尝试过: li.disabled a { pointer-events: none; cursor: default; opacity: 0.6; } li.disabled a:hover { pointer-events: none; cursor: default; opacity: 0.6; } 根

我有以下HTML:

<li>
   <a href="mylink">Some text</a>
</li>
我也尝试过:

li.disabled a {
  pointer-events: none;
  cursor: default;
  opacity: 0.6;
}

li.disabled a:hover {
  pointer-events: none;
  cursor: default;
  opacity: 0.6;
}
根据,chrome不支持
指针事件
,因此此解决方案应该可以帮助您:

HTML


在Firefox的ChromeWorks中,这两款软件也同样适用于我。编辑:在微软的边缘不起作用。谢谢你们,我猜是精神错乱和精神错乱开始了。我现在就去睡觉,明天再试一次。放在这里是为了完整。
li.disabled {
  pointer-events: none;
  cursor: default;
  opacity: 0.6;
}

li.disabled:hover {
  pointer-events: none;
  cursor: default;
  opacity: 0.6;
}
li.disabled a {
  pointer-events: none;
  cursor: default;
  opacity: 0.6;
}

li.disabled a:hover {
  pointer-events: none;
  cursor: default;
  opacity: 0.6;
}
<ul>
  <li class="disabled">
   <a href="http://google.com">Some text</a>
</li>
</ul>
li.disabled a {
  cursor: default;
  opacity: 0.6;
}
li.disabled{
  position: relative;
}
li.disabled:before{
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  content: "";
  opacity: 0;
}