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 通过两张图片实现彩灯闪烁
①、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,延时时间不同;
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。