当我单击“提交”或“重置”按钮时,我需要使用什么命令才能使其不缩放。我希望他们看起来很正常。我应该对这个程序使用悬停,但不能对最后 2 个按钮使用悬停
请参阅下面我到目前为止所拥有的代码。任何事情都值得赞赏
<!DOCTYPE html>
<html>
<head>
<title>CSS rules</title>
<style>
input:focus{
background-color: yellow;
height: 40px;
width: 280px;
color: blue;
font-size: 24px;
}
input:hover{
background-color: cyan;
height: 40px;
width: 280px;
color: red;
font-size: 24px;
}
</style>
</head>
<body>
<form action="">
<table>
<tr>
<td>Last Name:</td>
<td>
<input type="text" id="LastName" />
</td>
</tr>
<tr>
<td>First Name:</td>
<td>
<input type="text" id="FirstName"/>
</td>
</tr>
<tr>
<td>E-mail Address :</td>
<td>
<input type="password" id="Email"/>
</td>
</tr>
<tr>
<td>
<input type="submit"/>
</td>
<td>
<input type="reset"/>
</td>
</tr>
</table>
</form>
</body>
<!--body tag ends here-->
</html>
<!--html tag ends here-->
尝试使用代码,但我无法弄清楚
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
更改了调用样式的方式。通过在 CSS 中传递 [type=text],您可以确保只有 type=text 和 type=password 拾取样式,并使提交和重置按钮不拾取样式。