滚动条样式

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
    /*goolge chrome 滚动条*/
    ::-webkit-scrollbar-track-piece {   background-color:#CCC;}
    ::-webkit-scrollbar                {   width:13px;}
    ::-webkit-scrollbar-thumb        {   background-color:#999;}
    ::-webkit-scrollbar-thumb:hover {   background-color:#999;}
    ::-webkit-scrollbar-arrow         {   color:#000;   backgound:#0F0;}
    /* IE 滚动条*/
    .scrollbar                        {
                                        SCROLLBAR-ARROW-COLOR:#666666;
                                        SCROLLBAR-FACE-COLOR:#666666;
                                        SCROLLBAR-DARKSHADOW-COLOR:#CCCCCC;
                                        SCROLLBAR-HIGHLIGHT-COLOR:#CCCCCC;
                                        SCROLLBAR-3DLIGHT-COLOR:#CCCCCC;
                                        SCROLLBAR-SHADOW-COLOR:#CCCCCC;
                                        SCROLLBAR-TRACK-COLOR:#cccccc;    
                                    }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div style=" height:300px; overflow:auto; " class="scrollbar">
            <div style=" height:200px; width:100px; background:#000;"></div>
            <div style=" height:200px; width:100px; background:#1d953f;"></div>
            <div style=" height:200px; width:100px; background:#ef5b9c;"></div>
            <div style=" height:200px; width:100px; background:#f47920;"></div>
        </div>    
    </form>
</body>
</html>

效果如下:IE6和Chrome

posted @ 2012-12-17 11:17  challengesoflife  阅读(190)  评论(0编辑  收藏  举报