1、array.find() 方法在低版本浏览器中不兼容,可以使用 for 循环替代;

2、ios 的 iframe 不支持 http 的链接,只支持 https 的链接;

3、includes() 方法在低版本安卓手机中不兼容,可以使用 indexOf() 替代;

4、js 移除 dom 元素属性:

部分低版本 ios 中,dom.style = null 或者 dom.style = '' 会报错;
报错信息:attempt to assign to readonly property

fix:使用 removeAttribute;

参考网址:http://blog.xuite.net/vexed/tech/21902237-用+JavaScript+把+element.style+全部覆寫或清空 (国外网址)

5、css 通过两张图片实现彩灯闪烁
light-2.pnglight-1.png

①、animation: twinkle 1s infinite 1s steps(1, start);

@keyframes twinkle {
    0% {
        background-image: url('./static/assets/theme/doll/light-1.png');
    }
    50% {
        background-image: url('./static/assets/theme/doll/light-2.png');
    }
    100%{
        background-image: url('./static/assets/theme/doll/light-1.png');
    }
}

参考文章地址:https://www.zhangxinxu.com/wordpress/2018/06/css3-animation-steps-step-start-end/ 

②、两张图片同时存在,分别设置animation动画控制opacity,延时时间不同;

小小赵的随笔空间
1 声望0 粉丝

这里是我自己的小小空间,把遇到的问题记录下来方便以后回顾,也希望这里的某些内容可以对你有所帮助。如果我的笔记有小问题,可以留言给我噢~大家一起变努力变得更优秀!