动态绑定class
:class="{btnleft:tab3===2}"
:class="[hqSummaryNum>=1?'num':'numWhite']"
换行符
小手样式
cursor:pointer
深拷贝
JSON.parse(JSON.stringify(obj))
运算
& 同时为1才得1,只要一个为0就为0。
| 两个位只要有一个为1,结果都为1。否则为0
&& 一个为假就为假,全真则为真,遇假则停
|| 一个为真就为真,全假则为假,遇真则停
不换行
word-wrap:break-word;
word-break:normal;
flex布局
.flex-between{
display: flex;
justify-content: space-between;
}
.flex-column{
display: flex;
flex-direction: column;
}
\
.flex-start{
display: flex;
justify-content: flex-start
}
.flex-around{
display: flex;
justify-content: space-around;
}
颜色渐变
background: -webkit-linear-gradient(left, #FB4E69, #FF7171);
背景渐变动画
.box{
background: linear-gradient(-45deg, #2d8cf0, #19be6b, #ff9900, #ed3f14);
animation: gradientBG 15s ease infinite;
background-size: 400% 400%;
}
@keyframes gradientBG{
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
替换双引为单引
replace(/"/g, "'")