Jqery实现数据展示

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul{
            margin: 0;
            padding:  0;
            list-style: none;
            width: 770px;
            border: 5px  solid #555;
        }
        ul>li{
            border-bottom: 1px double #ccc;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }
        ul>li>span{
            border-right: 1px double #ccc;
            float: left;
            width: 101px;
            margin: 0;
            padding: 5px 4px;
        }
    </style>
    <script src="js/jquery.min.js"></script>
</head>
<body>
    <ul>
        <li><span>ID</span><span>名称</span><span>等级</span><span>金币</span><span>排名</span><span>称号</span><span>战队</span></li>
        <li><span>1</span><span>AAA</span><span>30</span><span>6000</span><span>80</span><span>超凡大师</span><span>WE</span></li>
        <li><span>1</span><span>AAA</span><span>30</span><span>6000</span><span>80</span><span>超凡大师</span><span>WE</span></li>
        <li><span>1</span><span>AAA</span><span>30</span><span>6000</span><span>80</span><span>超凡大师</span><span>WE</span></li>
        <li><span>1</span><span>AAA</span><span>30</span><span>6000</span><span>80</span><span>超凡大师</span><span>WE</span></li>
        <li><span>1</span><span>AAA</span><span>30</span><span>6000</span><span>80</span><span>超凡大师</span><span>WE</span></li>
        <li><span>1</span><span>AAA</span><span>30</span><span>6000</span><span>80</span><span>超凡大师</span><span>WE</span></li>
       
       
    </ul>
    <script>
    $('ul>li:not(li:first)').each(function(index,elem){
        $(this).on('mouseover',function(){
            $(this).css({'background-color':'#cccc','color':'#000000'}).on('mouseleave',function(){
                $(this).css({'background-color':'#FFFFFF','color':'#555'})

            })

        })
            

        })

    </script>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值