halden
V2EX  ›  Safari

Safari 内 iframe 下拉回弹背景问题

  •  
  •   halden · Apr 19, 2016 · 3527 views
    This topic created in 3695 days ago, the information mentioned may be changed or developed.

    今天写 css 的时候发现一个问题,大家都知道 safari 有个页面回弹的效果(用触摸板的时候,鼠标好像没有),比如你把页面网上拉一点,然后用力往下拉,就会触发这个效果,现在设置如下:

    我在 html 里面放了一个 iframe , 定义 iframe 的 css: { background:black;}, iframe 内外 html 的 body 都给了 {background:black;}

    然后问题来了,对 iframe 触发回弹效果时,回弹留空的部分是白色的 白色的 白色的!!!

    也就是说那一节的颜色和网页的背景颜色不一样,而且只有对 iframe 下拉才有这个问题(触发这个还有一个条件, iframe 之中的内容本身要超过 iframe 的高度,也就是说 iframe 要出现滚动条),丑死了有木有,求破?

    4 replies    2016-04-19 23:03:42 +08:00
    bigcoon
        1
    bigcoon  
       Apr 19, 2016 via iPhone
    目测 lz 处女座
    wsph123
        2
    wsph123  
       Apr 19, 2016 via iPhone
    内侧的网页加个样式
    html{background:#000}
    maplerecall
        3
    maplerecall  
       Apr 19, 2016
    不滚动 iframe 的 document ,滚动 body 或者子元素试试
    halden
        4
    halden  
    OP
       Apr 19, 2016
    @bigcoon 射手座路过。。。


    @wsph123 试过了,不行


    @maplerecall 呃。。具体操作?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1549 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 16:39 · PVG 00:39 · LAX 09:39 · JFK 12:39
    ♥ Do have faith in what you're doing.