移动端纯css超出盒子出现横向滚动条

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        ul {
            list-style: none;
            300px;
            margin:100px auto;
            height:100px;
            display: -webkit-box;
            white-space: nowrap;
            overflow: hidden;
            -webkit-backface-visibility: hidden;
            -webkit-perspective: 1000;
            -webkit-overflow-scrolling: touch;
            text-align: justify;
            overflow-x: initial;
        }
        li {
            100px;
            height:100px;
            line-height: 100px;
            text-align: center;
            background-color: #1b961b;
            border:1px solid;
        }
        @media only screen and (max- 768px){
            ul {
                100%;
            }
        }
    </style>
</head>
<body>
    <div class="wrap">
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
            <li>6</li>
            <li>7</li>
            <li>8</li>
            <li>9</li>
            <li>0</li>
        </ul>
    </div>
</body>
</html>

  在移动端使用,主要看ul上的属性

原文地址:https://www.cnblogs.com/dayin1/p/11400845.html