V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
icanfork
V2EX  ›  问与答

如何解决移动设备浏览器中 position:fixed 无效的问题

  •  
  •   icanfork · Jul 12, 2013 · 6205 views
    This topic created in 4683 days ago, the information mentioned may be changed or developed.
    大家好,麻烦大家一下

    最近在做WebApp,发现移动设备浏览器(特别是UC)对于 position:fixed 非常不友好

    我现在想实现的是:背景图为第一层,文字内容(长条)为第二层

    在上拉第二层时,第一层(背景层)能保持不动(fixed)

    但是在UC和QQ手机浏览器上面,均无法实现想要的效果

    求解决方案

    =============================================
    尝试 iscroll-4 解决,但是发现浏览器渲染吃力,不流畅

    手机淘宝网的那个扇形菜单就能很好的兼容UC等浏览器呢
    4 replies    1970-01-01 08:00:00 +08:00
    humiaozuzu
        1
    humiaozuzu  
       Jul 22, 2013
    badboy
        2
    badboy  
       Jul 23, 2013
    居然看到debin你了~哈哈哈
    dorentus
        3
    dorentus  
       Jul 23, 2013
    用 CSS background-attachment:fixed; 试试呢?
    HaEx
        4
    HaEx  
       Jul 23, 2013   ❤️ 1
    要排除受 transform 的影响,transfrom 样式会新建 context
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4074 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 60ms · UTC 00:53 · PVG 08:53 · LAX 17:53 · JFK 20:53
    ♥ Do have faith in what you're doing.