[英]Unable to change height of input:type=“submit” button
The code: 编码:
<!DOCTYPE html>
<html>
<head>
<title>Set Alarm Clock</title>
<style type="text/css">
#container {
width: 600px;
height: 300px;
border: 1px solid black;
}
#hours, #minutes, #seconds {
width: 120px;
height: 80px;
}
#button {
width: 120px;
height: 80px;
}
</style>
</head>
<body>
<center>
<div id="container">
<h1>Set Alarm Clock</h1><br />
<label class="hours">
<input type="number" value="0" min="0" id="hours" />
</label>
<label class="minutes">
<input type="number" value="0" min="0" id="minutes" />
</label>
<label class="seconds">
<input type="number" value="0" min="0" id="seconds" />
</label>
<label>
<input type="submit" value="Set Alarm" id="button" />
</label>
</div>
</center>
</body>
</html>
I am trying to make the input:type="submit"
button the same height as the labels for the hours, minutes and seconds boxes i have created. 我正在尝试input:type="submit"
按钮与我创建的小时,分钟和秒框的标签高度相同。 However i can only change the width of the button, not the height. 但是我只能改变按钮的宽度,而不是高度。 How can i make the height the exact same as the labels? 如何使高度与标签完全相同? Thanks. 谢谢。
Button should be 86px height: 按钮应为86px高度:
#button {
width: 120px;
height: 86px;
}
It is happening because the height of the button is including the paddings and the border. 它正在发生,因为按钮的高度包括填充和边框。 86px is the whole height of the button. 86px是按钮的整个高度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.