我做了一個css按鈕,但是當我將鼠標懸停在按鈕上時,我無法弄清楚如何將文本顏色更改爲白色。懸停時的目標文字顏色
.button1o {
background-color: transparent;
padding: 10px 15px;
margin-right: 15px;
border: 2px solid #f44336;
border-radius: 2px;
}
a.button1o:hover {
background-color: #f44336;
transition: all 0.9s ease 0.1s;
}
.button1o-text {
font-size: .7em;
font-family: 'PT Sans', sans-serif;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0;
color: #f44336;
}
<a class="button1o" href="" target="_blank">
<span class="button1o-text">Flat button</span>
</a>
當我增添色彩
a.button1o:hover
這是行不通的。
我也試過:
- a.button1o文本:懸停