发表于: 2020-05-01 21:11:47
1 1365
今天的任务:
使用less重新写任务4,相对之前的代码,确实可以精简不少,
问题:我在两个不同的类中都有button和.btn:hover,如果用less怎么能只写一个然后用来代替?
.header {
display: flex;
justify-content: space-between;
color: white;
background-color: #66cccc;
button {
border: none;
background-color: #66cccc;
}
.btn:hover, .btn:active, .btn:focus {
color: white;
border: none;
background-color: #55a5a5;
}
}
.landing {
color: white;
button {
border: none;
background-color: #66cccc;
}
.btn:hover, .btn:active, .btn:focus {
color: white;
border: none;
background-color: #55a5a5;
}
}
评论