您可以嘗試運行以下代碼,以使用 CSS 在按鈕懸停時淡入
示例
Live演示
<!DOCTYPE html>
<html>
<head>
<style>
.btn {
background-color: orange;
color: white;
padding: 10px;
text-align: center;
font-size: 16px;
margin: 5px;
opacity: 0.5;
transition: 0.5s;
display: inline-block;
text-decoration: none;
cursor: pointer;
}
.btn:hover {
opacity: 2
}
</style>
</head>
<body>
<button class = "btn">Result</button>
</body>
</html>
登錄后復制
以上就是使用 CSS 在按鈕懸停時淡入的詳細內容,更多請關注www.92cms.cn其它相關文章!






