코드는 매우 간단하고 여기에는 BBS가 많지 않습니다.
코드 사본은 다음과 같습니다.
<! doctype html>
<html lang = "zh-cn">
<헤드>
<meta charset = "utf-8">
<title> 문서 </title>
<스타일 유형 = "텍스트/CSS">
Body, Ul, Li {마진 : 0; 패딩 : 0; 목록 스타일 : 없음}
ul li {너비 : 100px; 높이 : 100px; 테두리 : 1px 고체 #f00; 플로트 : 왼쪽; 마진 : 50px 10px; 배경색 : #ffffff;}
ul li.current {Border : 1px solid #dfdfdf; 배경색 :#FF0000;}
</스타일>
<script type = "text/javaScript"src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"> </script>
</head>
<body>
<H1> 마우스는 아래 블록을 통과합니다 </h1>
<ul>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
</ul>
</body>
</html>
<script type = "text/javaScript">
$ ( "ul li"). 마우스 오버 (function ()
{{
$ (this) .addclass ( "current");
}). 마우스 아웃 (function ()
{{
$ (this) .removeClass ( "current");
});
</스크립트>
매우 간단한 코드, 그것을 참조하십시오, 무료 확장, 나는 당신이 그것을 좋아할 수 있기를 바랍니다.