欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

使用mouse事件實現(xiàn)簡單的鼠標經(jīng)過特效

 更新時間:2015年01月30日 10:33:10   投稿:hebedich  
這篇文章主要介紹了使用mouse事件實現(xiàn)簡單的鼠標經(jīng)過特效的方法,需要的朋友可以參考下

代碼超級簡單,這里就不多BB了,直接奉上

復制代碼 代碼如下:

<!doctype html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
    body,ul,li{margin:0; padding:0; list-style:none}
    ul li{width:100px; height:100px; border:1px solid #f00; float:left; margin:50px 10px; background-color:#ffffff;}
    ul li.current{border:1px solid #dfdfdf; background-color:#ff0000;}
</style>
<script type="text/javascript" src=">
</head>
<body>
    <h1>鼠標經(jīng)過下面的塊</h1>
    <ul>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
    </ul>
</body>
</html>
<script type="text/javascript">
    $("ul li").mouseover(function()
    {
         $(this).addClass("current");
    }).mouseout(function()   
    {
        $(this).removeClass("current");       
    });
</script>

非常簡單的代碼,小伙伴們參考下,自由擴展,希望大家能夠喜歡。

相關文章

最新評論