채택완료

css hover 질문입니다..

2018-09-19 (수) 18:08:59 4,479

      <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개 / 댓글 2개

채택된 답변
+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 에 집중하다보니 놓쳤네요..

신고가 접수되어 자동으로 블라인드 된 답변입니다.
내용을 보시려면 를 클릭하세요.

신고가 접수되어 자동으로 블라인드 된 답변입니다.
내용을 보시려면 를 클릭하세요.

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