光棒效果&展开面板

一、光棒效果

  <style type ="text/css">
        .mover {
             background-color:yellow;
        }
    </style>
    <script src="Script/jquery-1.7.1.min.js"></script>
    <script language="javascript">
        $(document).ready(function () {
            $("#GridView1 tr:gt(0)").mouseover(function () {
                $(this).addClass("mover");
            }).mouseout(function () {
                $(this).removeClass("mover");
            });
        });
    </script>

给奇数行和偶数行分别定义两种颜色

    
//把odd放在设计界面GridView属性里的样式RowStyle里的CssClass属性上,把even放在样式AlternatingRowStyle里的CssClass属性上
    
     .odd { background-color:#9dc2be; } .even { background-color:#e1e586; }

 二、展开面板

 <style type="text/css">
        ul {
            list-style-type:none;
            width:400px;
        }

        .titlebar {
            padding:5px;
            background-color:navy;
            color:white;
            margin-top:1px;
        }
        .contentpanl {
            padding:5px;
            background-color:#ccffff;
            display:none;
        }
    </style>
    <script src="Script/jquery-1.7.1.min.js"></script>
    <script language="javascript">
        $(document).ready(function () {
            $(".titlebar").click(function () {
                var s = $(this).next().css("display");
                if (s == "none") {
                    //$(this).next().show();//无任何效果
                    // $(this).next().fadeIn(3000);//渐变
                    $(this).next().slideDown(3000);//下拉
                }
                else {
                    //$(this).next().hide();
                    //$(this).next().fadeOut(3000);
                    $(this).next().slideUp(3000);
                }
            });
        });
    </script>

 

转载于:https://www.cnblogs.com/qianxiaojinnian/p/4749901.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值