다음과 같은 동작은 무엇입니까? : 및 요소에서 두 요소가 모두 활성화되어 있으면 마우스를 올려 놓습니다. 데모하려면 http://jsfiddle.net/z6v4r/ 코드를 작성했습니다. 분명히 호버가 승자입니다.내용 : 활성 또는 : 호버 작동 여부?
div.abc div.xyz input:hover
{
border: 1px inset rgb(0, 69, 124);
border-radius:15px;
background-color: rgb(0, 69, 124);
color:white;
}
div.abc div.xyz input:active,div.abc div.xyz input:focus
{
border: 1px inset rgb(0, 69, 124);
border-radius:15px;
background-color:rgba(66, 87, 133, 0.24);
outline-style:none;
}
지금 것은이 모든에
<div class="abc">
<div class="xyz">
<input type="Something">
</input>
</div>
</div>
CSS : 다른 시나리오에서
(있는 내가 작업 한)
나는 다음과 같은 HTML에 대한 CSS를 썼다 active 나는 active : : focus의 배경색과 hover로부터 오는 폰트 os의 색깔을 얻는다.이러한 요소가 어떻게 요소에 적용되는지 개념이 필요합니다.
질문이 복잡해집니다. –
동일한 질문 : http://stackoverflow.com/questions/1677990/what-is-the-difference-between-focus-and-active –
[Specificity] (https : // developer .mozilla.org/ko-US/docs/Web/CSS/Specificity), [상속] (https://developer.mozilla.org/en-US/docs/Web/CSS/Inheritance)을 참조하십시오. – robertc