zoukankan      html  css  js  c++  java
  • 完美解决手机浏览器不支持fixed或者白屏 、 百度浏览器不支持fixed

    什么都不说了,直接上代码。亲们自己贴下来测试

    <!DOCTYPE html>
    
    <html lang="zh_cmn">
    
    <head>
        <head>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=yes,viewport-fit=cover">
            <title>完美解决手机浏览器不支持fixed或者白屏</title>
        </head>
    
        <style>
            html, body {
                -webkit-text-size-adjust: none;
                -webkit-touch-callout: none;
                vertical-align: middle;
                -webkit-user-select: none;
                font-size: 16px;
                position: relative;
                font-family: "Helvetica Neue",Helvetica,STHeiTi,"Roboto Regular",Roboto,"Droid Sans","Microsoft Yahei",sans-serif;
                margin: 0;
                padding: 0;
            }
            body{
    
                height: 100%;
            }
            .border-top:before{
                display: block;
                position: absolute;
                right: 0;
                left: 0;
                border-top: 1px solid #e1e1e1;
                content: ' '
            }
    
            .border-top {
                position: relative
            }
    
            .border-top:before {
                top: 0
            }
    
            @media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
                .border-top:before, .border-bottom:after {
                    -webkit-transform: scaleY(0.7);
                    transform: scaleY(0.7);
                    -webkit-transform-origin: left bottom
                }
    
                .border-top:before {
                    -webkit-transform-origin: left top
                }
            }
    
            @media only screen and (-webkit-min-device-pixel-ratio: 2) {
                .border-top:before, .border-bottom:after {
                    -webkit-transform: scaleY(0.5);
                    transform: scaleY(0.5)
                }
            }
    
    
            .nav {
                position: fixed;
                right: 0;
                bottom: 0;
                left: 0;
                z-index: 9020;
                background: #ffc754
            }
    
            .nav:before {
                border-top-color: #e9e9e9
            }
            .btn{
                overflow: hidden;
                height: 50px;
                text-align: center;
                white-space: nowrap;
                font-size: 0
            }
    
        </style>
    
    </head>
    
    <body>
    <div class="nav border-top iphonex-bottom-fixed">
        <ul class="btn"></ul>
    </div>
    
    <div>
        <img src="active.jpg" width="100%"/>
    </div>
    </body>
    </html>
  • 相关阅读:
    使用Gson将对象类转成Json对象时出现u003d的问题
    spark 关联source
    FutureTask demo
    mybatis batchinsert
    spark-shell下有提示了,但是发现不能退格
    why big data
    MySQL buffer pool中的三种链
    MySQL 性能监控 4 大指标
    实战演示疑惑 mysql insert到底加什么锁
    MySQL锁(行锁、表锁、页锁、乐观锁、悲观锁等)
  • 原文地址:https://www.cnblogs.com/wukeke/p/8423982.html
Copyright © 2011-2022 走看看