鼠標放上前效果:blog
鼠標放上後效果:it
代碼以下:class
HTML代碼:im
<button class="btn">LEARN MORE</button>
margin
CSS代碼:top
.btn {
color: white;
background-color: #e1e1e1;
padding: 0px 1em;
width:915px;
height: 45px;
margin-left:-110px;
border: 0px solid black;
margin-top:150px;;
}
.btn:hover {
background-color: #2579d1;
}
/*active 要在後面 不然會被hover覆蓋*/
.btn:focus {
background-color: #00ff00;
}
.btn:active {
background-color: #000000;
}
img