게시판 리스트 화면에서 마우스오버시 백그라운드 색 변하는 효과? 정보
게시판 리스트 화면에서 마우스오버시 백그라운드 색 변하는 효과?본문
댓글 전체
테이블 <TR>태크에 onmouseover하고 onmouseout 이벤트에 스타일 적용해주시면 될것 같습니다.
예시
<tr onMouseOver='this.style.backgroundColor="#b8dcee"' onMouseOut='this.style.backgroundColor=""' style="cursor:hand">
색상은 원하시는 색상으로...^^
예시
<tr onMouseOver='this.style.backgroundColor="#b8dcee"' onMouseOut='this.style.backgroundColor=""' style="cursor:hand">
색상은 원하시는 색상으로...^^
css로 하는법은 없나요?
<style type=”text/css”>
td.off { background: #cccccc;}
td.on { background: #b8dcee;}
</style>
<tr class=”off” onmouseover=”this.className=’on‘” onmouseout=”this.className=’off‘”>
td.off { background: #cccccc;}
td.on { background: #b8dcee;}
</style>
<tr class=”off” onmouseover=”this.className=’on‘” onmouseout=”this.className=’off‘”>
list.skin에 그대로 붙혀넣기하면 되나요? ㅎㅎ
스타일에 오타가 있네요.ㅠ
td를 tr로 ..ㅋㅋㅋ
list.skin에 넣으신다고요??
제가 현재 사용하시는 스킨에 어떤 스타일이 적용된지 몰라서...
td를 tr로 ..ㅋㅋㅋ
list.skin에 넣으신다고요??
제가 현재 사용하시는 스킨에 어떤 스타일이 적용된지 몰라서...
<tr class=”off” onmouseover=”this.className=’on‘” onmouseout=”this.className=’off‘”>
이건 style에 넣어도 적용 안되는거로 알고 있는데 아닌가여 ?ㅋ
이건 style에 넣어도 적용 안되는거로 알고 있는데 아닌가여 ?ㅋ
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN" “http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Table Background Change</title>
<style type="text/css">
tr.off {background:#ffffff}
tr.on {background:#999999}
</style>
</head>
<body>
<table width="700" cellpadding="3">
<tr>
<td>No.</td>
<td>제목</td>
<td>글쓴이</td>
<td>작성일</td>
</tr>
<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'">
<td>No.</td>
<td>게시판입니다.</td>
<td>홍길동</td>
<td>2013-09-17</td>
</tr>
<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'">
<td>No.</td>
<td>게시판입니다.</td>
<td>홍길동</td>
<td>2013-09-17</td>
</tr>
<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'">
<td>No.</td>
<td>게시판입니다.</td>
<td>홍길동</td>
<td>2013-09-17</td>
</tr>
<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'">
<td>No.</td>
<td>게시판입니다.</td>
<td>홍길동</td>
<td>2013-09-17</td>
</tr>
</table>
</body>
</html>
<!-- 게시판 목록 시작 -->
<tr onMouseOver='this.style.backgroundColor="#b8dcee"' onMouseOut='this.style.backgroundColor="#d4d4d4"' style="cursor:hand">
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<div class="board_top">
<div style="float:left;">
<form name="fcategory" method="get" style="margin:0px;">
<? if ($is_category) { ?>
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4[charset])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option>
<?=$category_option?>
</select>
<? } ?>
</form>
</div>
<div style="float:right; margin-bottom:10px;">
<img src="<?=$board_skin_path?>/img/icon_total.gif" align="absmiddle" border='0'>
<span style="color:#888888; font-weight:bold;">전체 <?=number_format($total_count)?></span>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border='0' align="absmiddle"></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" border='0' title="관리자" align="absmiddle"></a><?}?>
</div>
</div>
<!-- 제목 -->
<form name="fboardlist" method="post">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table cellspacing="0" cellpadding="0" class="board_list">
<col width="50" />
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
<col />
<col width="110" />
<col width="40" />
<col width="50" />
<? if ($is_good) { ?><col width="40" /><? } ?>
<? if ($is_nogood) { ?><col width="40" /><? } ?>
<tr>
<th>번호</th>
<? if ($is_checkbox) { ?><th><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type="checkbox"></th><?}?>
<th>제 목</th>
<th>글쓴이</th>
<th><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></th>
<th><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></th>
<? if ($is_good) { ?><th><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></th><?}?>
<? if ($is_nogood) { ?><th><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></th><?}?>
</tr></tr>
----------
th -> td?
list.skin파일 맞죠?
<tr onMouseOver='this.style.backgroundColor="#b8dcee"' onMouseOut='this.style.backgroundColor="#d4d4d4"' style="cursor:hand">
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<div class="board_top">
<div style="float:left;">
<form name="fcategory" method="get" style="margin:0px;">
<? if ($is_category) { ?>
<select name=sca onchange="location='<?=$category_location?>'+<?=strtolower($g4[charset])=='utf-8' ? "encodeURIComponent(this.value)" : "this.value"?>;">
<option value=''>전체</option>
<?=$category_option?>
</select>
<? } ?>
</form>
</div>
<div style="float:right; margin-bottom:10px;">
<img src="<?=$board_skin_path?>/img/icon_total.gif" align="absmiddle" border='0'>
<span style="color:#888888; font-weight:bold;">전체 <?=number_format($total_count)?></span>
<? if ($rss_href) { ?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border='0' align="absmiddle"></a><?}?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" border='0' title="관리자" align="absmiddle"></a><?}?>
</div>
</div>
<!-- 제목 -->
<form name="fboardlist" method="post">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table cellspacing="0" cellpadding="0" class="board_list">
<col width="50" />
<? if ($is_checkbox) { ?><col width="40" /><? } ?>
<col />
<col width="110" />
<col width="40" />
<col width="50" />
<? if ($is_good) { ?><col width="40" /><? } ?>
<? if ($is_nogood) { ?><col width="40" /><? } ?>
<tr>
<th>번호</th>
<? if ($is_checkbox) { ?><th><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type="checkbox"></th><?}?>
<th>제 목</th>
<th>글쓴이</th>
<th><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></th>
<th><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></th>
<? if ($is_good) { ?><th><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></th><?}?>
<? if ($is_nogood) { ?><th><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></th><?}?>
</tr></tr>
----------
th -> td?
list.skin파일 맞죠?