想讓鼠標放到按鈕上時改變背景色怎么實現啊
想讓鼠標放到按鈕上時改變背景色
小呀么小二郎呀
2016-06-08 13:05:45
TA貢獻188條經驗 獲得超91個贊
<!DOCTYPE html>
<html>
<head>
? ?<title> new document </title>
? ?<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
? ?<style type="text/css">
? ? ? ?.btnName:hover {
? ? ? ? ? ?background: red;
? ? ? ?}
? ?</style>
</head>
<body>
<input type="button" value="按鈕變色" class="btnName" />
</body>
</html>
舉報