css实现简单的下拉列表

 
       *{
            padding: 0;
            margin: 0;
        }
        .dropbox{
            display: block;
        }
        .list{
            display: block;
            width: 80px;
            height: 30px;
            text-decoration: none;
            background-color: #929292;
            text-align: center;
            line-height: 30px;
            color: white;
        }
        .box{
            display: none;
            width: 70px;
            height: 100px; ;
        }
        .box li{
            list-style: none;
        }
        .box li a{
            text-decoration: none;
            display: block;
            width: 70px;
            height: 25px;
            background-color: darkgray;
            color: white;
            text-align: center;
            line-height: 25px;
        }
        .list:hover{
            background-color: #c40000;
        }
        .dropbox:hover .box{
            display: block;
        }
        .box li a:hover{
            background-color: #c40000;
        }
css实现简单的下拉列表_第1张图片
list.gif

你可能感兴趣的:(css实现简单的下拉列表)