마우스오버 텍스트 색상변화
본문
sct_li에 마우스를 올리면 라인색과 배경색이 바뀌면서
sct_txt a 텍스트 색상도 밝게 바꾸고 싶은데
sct_li 안에 있는 텍스트 색상도 함께 바뀌게 하려면 어떻게 해야하나요?
.smt_10 .sct_li {clear:both;
height:116px;
padding:5px 0;
border-bottom:1px dotted #aaa;
}
.smt_10 .sct_li:hover {background:#555;
border-bottom:1px solid #333;
color:#fff;
}
.smt_10 .sct_a {display:inline-block;position:relative;text-decoration:none}
.smt_10 .sct_a:focus, .smt_50 .sct_a:hover {text-decoration:none}
.smt_10 .sct_txt {margin:5px 0 8px}
.smt_10 .sct_txt a {display:block;
text-overflow:ellipsis;
overflow:hidden;
white-space:nowrap;
color:#666;
}
답변 2
.smt_10 .sct_li:hover {color:#008ce0}
.smt_10 .sct_li:hover .sct_txt a{color:#008ce0}
이런식으로 해보세요~
.smt_10 .sct_li:hover
위와같이 :hover 클래스가 마우스 오버시 동작합니다.
답변을 작성하시기 전에 로그인 해주세요.