Fork me on GitHub

秘技,左右横跳

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>首页</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="css/sm.min.css">
    <link rel="stylesheet" href="css/sm-extend.min.css">
</head>
<style>
/*隐藏滚轮*/
.aaa::-webkit-scrollbar {
display: none;
}
.aaa{
    background: #fff;
    font-size: .75rem;
    width: 100%;
    display: inline;
    white-space: nowrap;
    overflow-x: scroll;
    float: left;
    overflow-y: hidden;
    line-height: 40px;
    height: 40px;
    margin:0;
    padding:0;
}
.bbb{
    display: inline-block;
    height: 39px;
    margin-left: 10px;
    color: #999;
}
</style>
<body>
    <div class="aaa">
        <div class="bbb">喜欢上了猪</div>
        <div class="bbb">喜欢上了猪</div>
        <div class="bbb">喜欢上了猪</div>
        <div class="bbb">喜欢上了猪</div>
        <div class="bbb">喜欢上了猪</div>
        <div class="bbb">喜欢上了猪</div>
        <div class="bbb">喜欢上了猪</div>
        <div class="bbb">喜欢上了猪</div>
        <div class="bbb">喜欢上了猪</div>
    </div>
</body>
</html>

 

posted @ 2018-05-16 16:07  森海轮回  阅读(539)  评论(0编辑  收藏  举报