게시글 제목 마우스오버시 배경색이 바뀌는 효과
http://www.ggaeal.com/bbs/board.php?bo_table=humor
위 게시판처럼 게시글 제목에 마우스를 갖다대면 색이 바뀌는 효과에 대해 묻고싶습니다.
style.css 손대면 된다는데 구체적으로 어떻게?
참고로 배추베이직 사용중입니다.
위 게시판처럼 게시글 제목에 마우스를 갖다대면 색이 바뀌는 효과에 대해 묻고싶습니다.
style.css 손대면 된다는데 구체적으로 어떻게?
참고로 배추베이직 사용중입니다.
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 3개
<div class="list">내용</div>
.list {
background: #fff;
}
.list:hover {
background: #000;
}
[/code]
.board_list tr.bg1:hover { background:#fbfbfb; }
.board_list tr.notice { background-color:#f4f7fc; }
수정했는데 안 되네요.
자스로 먹이셔야 합니다.
reference 하신 저 사이트에서는
onmouseover="this.style.backgroundColor="#f2f0f;" onmouseout="this.style.backgroundColor="#ffffff"
이런식으로 자스로 background-color 를 마우스 오버시 색상을 바꾸고 있구요, jQuery 로 function 을 짜는 방법도 있습니다.
이런식으로.
$(function() {
$("table").delegate('td','mouseover mouseleave', function(e) {
if (e.type == 'mouseover') {
$(this).parent().addClass("hover");
$("colgroup").eq($(this).index()).addClass("hover");
} else {
$(this).parent().removeClass("hover");
$("colgroup").eq($(this).index()).removeClass("hover");
}
});
});
암튼 css 로는 해결방법이 아닙니다.