.btn
普通状态
2..btn:hover
鼠标悬停状态
3..btn:active
点击状态
4..btn:focus
取得焦点状态.btn{
flex: 0 1 140px;
/* flex布局设置 */
background-color: #f6f6f6;
color: black;
padding: 8px 10px; /* 内边框 */
text-align: center;
text-decoration: none;
margin-right: 2px;
display: inline-block;
font-size: 14px;
margin: 4px 2px; /* 外边框 */
cursor: pointer;
border-radius: 8px;
transition-duration: 0.4s; /* 渐变 */
}
.btn:hover {
background-color: #4CAF50;
color: white;
}
.btn:active {
background-color:darkgreen
}
.btn:focus {
outline: 0; /* 去除点击后的边框 */
}