• 移动端横向滚动


    <!DOCTYPE html>
    <html lang="zh-cn">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
        <style>
            body{
                background-color: #ccc;
            }
            .s-header{
                overflow: hidden;
                height: 40px;
            }
            .s-header div:nth-child(1){
                float: left;
                margin-left: 20px;
                margin-top: 9px;
                font-size: 10px;
            }
            .s-header div:nth-child(2){
                float: right;
                margin-right: 20px;
                margin-top: 9px;
                border:1px solid #000;
                padding: 4px;
                border-radius: 12px;
                font-size: 10px;
            }
            .s-con{
                height: 172px;
                display: -webkit-box;
                overflow-x: scroll;
                -webkit-overflow-scrolling:touch;            
            }
            .swiper{
                height: 164px;
                 280px;
                background: url('./1.png') no-repeat;
                background-size: 100% 100%;
                position: relative;
                margin: 4px;
            }
            .swiper .c1 {
                position: absolute;
                bottom: 0;
                left: 0;
                 100%;
                background-color:rgba(0,0,0,0.3);
            }
            .swiper .c1 .zhi{
                overflow: hidden;
                text-overflow: ellipsis;
                -o-text-overflow: ellipsis;
                white-space: nowrap;
                 200px;
                margin: 0;
            }
            .swiper .c1  .icon{
                 100%;
                overflow: hidden;
            }
            .left{
                float: left;
            }
            .right {
                float:right;
            }
        </style>
    </head>
    <body>
        <div class="content">
            <div class="s-header">
                <div>周边动态</div>
                <div>全部动态</div>
            </div>
            <div class="s-con">
                    <div class="swiper">
                        <!-- 下面的内容 -->
                        <div class="c1">
                            <div class="zhi">嘻嘻嘻嘻嘻嘻嘻嘻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻</div>
                            <div class="icon">
                                <div class="left">
                                    <i>左</i>
                                    <i>左</i>
                                </div>
                                <div class="right">
                                    <i>右</i>
                                    <i>右</i>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="swiper">
                        <!-- 下面的内容 -->
                        <div class="c1">
                            <div class="zhi">嘻嘻嘻嘻嘻嘻嘻嘻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻</div>
                            <div class="icon">
                                <div class="left">
                                    <i>左</i>
                                    <i>左</i>
                                </div>
                                <div class="right">
                                    <i>右</i>
                                    <i>右</i>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="swiper">
                            <!-- 下面的内容 -->
                            <div class="c1">
                                <div class="zhi">嘻嘻嘻嘻嘻嘻嘻嘻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻</div>
                                <div class="icon">
                                    <div class="left">
                                        <i>左</i>
                                        <i>左</i>
                                    </div>
                                    <div class="right">
                                        <i>右</i>
                                        <i>右</i>
                                    </div>
                                </div>
                            </div>
                    </div>
                    <div class="swiper">
                        <!-- 下面的内容 -->
                        <div class="c1">
                            <div class="zhi">嘻嘻嘻嘻嘻嘻嘻嘻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻</div>
                            <div class="icon">
                                <div class="left">
                                    <i>左</i>
                                    <i>左</i>
                                </div>
                                <div class="right">
                                    <i>右</i>
                                    <i>右</i>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="swiper">
                            <!-- 下面的内容 -->
                            <div class="c1">
                                <div class="zhi">嘻嘻嘻嘻嘻嘻嘻嘻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻</div>
                                <div class="icon">
                                    <div class="left">
                                        <i>左</i>
                                        <i>左</i>
                                    </div>
                                    <div class="right">
                                        <i>右</i>
                                        <i>右</i>
                                    </div>
                                </div>
                            </div>
                    </div>
                    <div class="swiper">
                        <!-- 下面的内容 -->
                        <div class="c1">
                            <div class="zhi">嘻嘻嘻嘻嘻嘻嘻嘻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻寻</div>
                            <div class="icon">
                                <div class="left">
                                    <i>左</i>
                                    <i>左</i>
                                </div>
                                <div class="right">
                                    <i>右</i>
                                    <i>右</i>
                                </div>
                            </div>
                        </div>
                    </div>
            </div>
        </div>
        <script>
            
            
        </script>
    </body>
    </html>
  • 相关阅读:
    围棋角部大眼的气
    openwrt 增加自定义包
    OpenWrt – 编译前的./scripts/feeds脚本用法
    memset 赋初值为无穷大和无穷小
    android 自动点击学习课程
    最多硬币问题
    最少硬币问题
    9.2 嵌套矩形问题
    ajax请求到一个controller在跳转到下载的controller上也不能下载,百度了一下总结下原因:发现原来jQuery的ajax回调已经把response的数据傻瓜式的以字符串的方式解析.
    MySQL 数据库的远程访问权限
  • 原文地址:https://www.cnblogs.com/Alitar/p/10749622.html
Copyright © 2020-2023  润新知