javascript - css3,背景渐变属性‘gradient’在android版本4.XX微信环境下不起作用
ringa_lee
ringa_lee 2017-04-10 15:15:55
[JavaScript讨论组]

现在想在微信中做翻书的渐变效果,可是发现有问题啊,在iphone版微信中效果很好,可是在android里面页角是方块并且还没有渐变!

下面是android系统下微信的效果,很难看

我的代码是这么写的

$('.turning').css({             
    width: (newTrangleX) + 'px',
    height: (newTrangleY) + 'px',
    left: ($nr.width()-newTrangleX+2) + 'px',
    top: ($nr.height()-newTrangleY+2) + 'px',
    backgroundColor: '#ff0000',
    background: '-webkit-linear-gradient(-'+ (90-Math.abs(Math.atan(tanA)*180/Math.PI)) +'deg, #fff 10%,#999 40%, #fff 50%, transparent 50%)',
    background: '-moz-linear-gradient(-'+ (90-Math.abs(Math.atan(tanA)*180/Math.PI)) +'deg, #fff 10%,#999 40%, #fff 50%, transparent 50%)',
    background: 'linear-gradient(-'+ (90-Math.abs(Math.atan(tanA)*180/Math.PI)) +'deg, #fff 10%,#999 40%, #fff 50%, transparent 50%)',
    webKitTransform: 'rotate(' + 2*Math.abs(Math.atan(tanA)*180/Math.PI) + 'deg) scaleX(-1)',
    transform: 'rotate(' + 2*Math.abs(Math.atan(tanA)*180/Math.PI) + 'deg) scaleX(-1)'
});

请问是android版的微信对css3兼容不好吗,该怎么写呢

ringa_lee
ringa_lee

ringa_lee

全部回复(1)
巴扎黑

Android上的微信css3渲染十分的不稳定,毕竟机型太杂。最好就是当检测到是Android的时候将这个效果屏蔽掉。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号