2026, 새로운 도약을 시작합니다.

css hover 질문입니다.. 채택완료

      <div class="profile-header-img">

                <img class="img-circle" src="mylecture.png" />
                
                <div class="rank-label-container">
                    <span class="label label-default rank-label">대한민국</span>
                </div>
            </div>

위의 img-circle 에 hover 하면 대한민국글자색상을 #fff 로 주고 싶습니다..

.profile-header-img > img.img-circle {
    width: 120px;
    height: 120px;
    border: 2px solid #51D2B7;
}
.profile-header-img > img.img-circle:hover {
    border: 2px solid #51D2B7;
 color:#fff;
}
.profile-header-img > img.img-circle:hover, .profile-header-img .img-circle:hover div span  {
 background-color:#51D2B7; color:#fff;
}
 

아무리 해도 color 안 먹어서요..

도움좀 부탁드립니다..

답변 4개

채택된 답변
+20 포인트
Copy
.img-circle:hover > .rank-label-container .label.label-default { color:white; }
로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

첫 코 달아주셔서 채택해드렸는데 이렇게 해도 안먹네요..ㅡ.ㅡ;;;

댓글을 작성하려면 로그인이 필요합니다.

Copy


.profile-header-img:hover > img.img-circle {

    border: 2px solid #51D2B7;

 color:#fff;

}

 

이렇게 해보셔요

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

넵 감사합니다.~

profile-header-img 로 hover 해서 바꺼야 바뀌는것 같습니다..

자꾸 img-circle 에 집중하다보니 놓쳤네요..

댓글을 작성하려면 로그인이 필요합니다.

네네

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

네네

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고