美文网首页
ios背景半透明渐变问题

ios背景半透明渐变问题

作者: wangwing | 来源:发表于2019-05-15 16:05 被阅读0次

    给一个层设置半透明的背景
    background:linear-gradient(to bottom, transparent, #ffffff)
    在安卓上显示正常(白色半透明)
    但ios上显示透明渐变会出现灰色,
    所以不能直接写成transparent, 改成如下
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%) 或 background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1))

    出现这个问题的原因参考网址:https://blog.csdn.net/simgenius/article/details/82688864

    相关文章

      网友评论

          本文标题:ios背景半透明渐变问题

          本文链接:https://www.haomeiwen.com/subject/yqnpaqtx.html