【发布时间】:2018-07-31 01:52:45
【问题描述】:
我希望我的按钮、链接和输入具有相同的样式。我的身高有问题,我无法确定原因。
在这个例子中,我的按钮和我的输入是 30 像素高,但我的链接只有 29 像素。
* {
box-sizing: border-box;
}
html {
font-size: 62.5%;
}
body {
font-size: 2rem;
}
button, input, a {
background: none;
border: 1px solid grey;
color: black;
font-size: 1.6rem;
outline: none;
padding: 5px;
text-decoration: none;
}
<button>Hello</button>
<input type="text" placeholder="Hello" />
<a href="#">Hello</a>
这有什么区别?
【问题讨论】:
标签: css button input hyperlink