2
#btn-home
버튼을 가리키면 :after
요소를 타겟팅하고 싶습니다. 타겟팅 : 후 요소 위에
#btn-home a {
display: inline-block;
color: #707070;
font-size: 1.15em;
font-weight: 600;
margin: 0 20px;
}
#btn-home {
position: relative;
display: inline-block;
margin: 0;
}
#btn-home a:after {
display: block;
position: absolute;
content: '';
margin: 0 auto;
height: 3px;
width: 25px;
background-color: red;
bottom: -7px;
left: 0;
right: 0;
}
<div id="btn-home">
<a href="<?php echo get_home_url(); ?>">HOME</a>
</div>
#btn-home
공중 선회 할 때
:after
요소의 너비를 대상으로합니다.
입니까? –