0
我正在嘗試爲我的網站創建文本框超鏈接。我想透明的箱子,直到盤旋,然後我想框來改變顏色,但不是文字。我想知道他們是否有辦法做到這一點?創建懸停時更改顏色的文本框
我正在嘗試爲我的網站創建文本框超鏈接。我想透明的箱子,直到盤旋,然後我想框來改變顏色,但不是文字。我想知道他們是否有辦法做到這一點?創建懸停時更改顏色的文本框
使用CSS,你會想添加背景顏色:yourcolor到懸停僞類。
下面是一個例子給你:
<!-- Here's the HTML -->
<div class="myDiv">
<p>Here is some text and then you will be <a href="mylink.html">linking</a> to another site</p>
</div>
然後在你的CSS你必須:
.myDiv a:hover {
background-color: red;
}
很簡單。