Chrome:点击后没有悬停状态,随机发生

问题描述 投票:1回答:1

不敢相信我在google上没有找到任何关于它的东西,这样一个令人讨厌的bug,不确定它是否可以在没有谷歌更新浏览器的情况下修复。

问题描述:在点击附加了悬停状态的元素后,随机地,在您重新单击或移动鼠标之前,不会显示悬停状态。

如果你在自定义复选框上尝试它会变得更糟,我想这与它创建双击的事实有某种关系。但是,即使是一个悬浮在它上面的普通div,它仍会出现。

一切都在Firefox和IE中正常工作。

使用chrome信息进行视频捕获:

enter image description here

测试自己:

i = 0;
$( ".button" ).click(function() {
  i++;
  $(".clicks").html(i);
});
body {
  text-align: center;
}

.button {
  background: #252B33;
  width: 100px;
  height: 100px;
  text-align: center;
  margin-bottom: 30px;
  display: flex;
  border-radius: 5px;
  align-items: center;    
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.button:hover {
  background: #ccc;
  cursor: pointer;
}

input {
  display: none;
}

.custom_checkbox {
  width: 30px;
  height: 30px;
  background: #5E6569;
  border-radius: 50%;
}

input:checked ~ .custom_checkbox {
  background: #FF4F68;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<br>
Number of clicks:
<span class="clicks">
  0
</span>
<br><br>

<div class="button">
</div>

<label class="button">
  <input type="checkbox">
  <div class="custom_checkbox">
  </div>
</label>
html css google-chrome
1个回答
0
投票

在google chrome上做“结束任务”后,问题似乎已经消失。我之前尝试关闭并启动浏览器,但只做了结束任务。

它必须与垃圾收集器有关,因为我有浏览器运行并且每天使用一周左右(晚上让计算机进入睡眠状态(Windows 8.1))。

会告诉你它是否应该重新出现。

© www.soinside.com 2019 - 2024. All rights reserved.