css - 多个div显示横向滚动条
巴扎黑
巴扎黑 2017-04-17 15:03:32
0
3
1296


类似这种条目多的话显示横向滚动条怎么实现

巴扎黑
巴扎黑

reply all(3)
阿神

This...

Come and look at the code; communicate at any time:

HTML:

    <p>
        <ul>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </p>
    
    
    

CSS:

    p{
        width: 996px;
        height: 120px;
        overflow-x:auto;
        overflow-y:hidden;  
    }
    ul{
        width: 1990px;
    }
    li{
        width: 220px;
        height: 300px;
        margin: 10px;
        float: left;
        background: red;
    }
刘奇

ul li writes and then li float, display block

左手右手慢动作

In the same building, put another p on the outer layer, and set the overflow-x of the outer p: auto

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template