div 에 focus 효과 주기 > IT 기술백서

IT 기술백서

직접 알아내거나 검색하기 귀찮아서 모아 둔 것

css | div 에 focus 효과 주기

본문

:focus-within 속성을 사용하면 된다.

 

[code language-html]

<style type="text/css">

.box:focus-within {

    border: thin solid black;

}

</style>

 

<div class="box">aaaaa</div>

[/code]

댓글 0개

등록된 댓글이 없습니다.

Menu