http://jsfiddle.net/leongaban/6vwLetd6/13/
我有一个定制的注册表格,样式来自aCodrops demo page
基本上在悬停时,我想设置标签文本的动画(让它淡入淡出),但现在只是想让文本颜色变为红色:

.input__label-content--jiro:hover {
  color: red !important;
}

<span id="full_name_label" class="input input_jiro">
  <input class="input__field input__field--jiro" type="text" id="input-1" />
  <label class="input__label input__label--jiro" for="input-1">
    <span class="input__label-content input__label-content--jiro">
      Full Name
    </span>
  </label>
</span>

但是当你停留在“全名”上时,颜色不会改变。你能看到什么阻碍了hover效应吗?

最佳答案

我删除了pointer-events: none声明,它起作用了。
看看JSFiddle
因此,我认为您只需要根据autovalue=>Docs覆盖这一个
这就是你想要的吗??

关于html - 将鼠标悬停在输入标签上不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27951259/

10-09 22:19