JS 编码 5 个不良习惯,如何避免?_WEB前端开发
在这篇文章中,我描述了JavaScript中常见的5种不良编码习惯。重要的是,本文会给出一些可行的建议,如何的摆脱摆脱这些习惯。
效果图
JavaScript常用的数组方法_WEB前端开发
JavaScript常用的数组方法
CSS 代码:
*{
margin: 0;
padding: 0;
}
body{
height: 100vh;
width: 100%;
overflow: hidden;
background-image: linear-gradient(125deg,#F44336,#E91E63,#9C27B0,#3F51B5,#2196F3);
background-size: 400%;
font-family: "montserrat";
animation: bganimation 15s infinite;
}
.text{
color: #fff;
font-size: 22px;
text-align: center;
margin: 350px 0;
/* text-transform: uppercase; */
}
@keyframes bganimation{
0%{
background-position: 0% 50%;
}
50%{
background-position: 100% 50%;
}
100%{
background-position: 0% 50%;
}
}
推荐教程:《CSS教程》