我有以下情景:
超文本标记语言
.input {
color: red;
}
.input:not(:disabled, :read-only):hover {
color: blue;
}
<input class="input" type="text" value="Hello">
<div class="input">Hello</div>
因此,悬停效果不会应用于div元素,但如果我从css中删除:read-only
伪类部分,它将会apply.
为什么会发生这种情况??