【发布时间】:2022-01-20 03:41:38
【问题描述】:
input{
height:30px;
width:77px;
margin:10px;
display:inline-block;
}
button{
height:30px;
width:77px;
margin:10px;
display:inline-block;
}
select{
height:30px;
width:77px;
margin:10px;
display:inline-block;
}
<input value="value" name="test" type="text"/>
<select></select>
<button>test</button>
我有输入、选择和按钮这三个元素都有相同的样式,但它们看起来不同,谁能告诉我为什么?
【问题讨论】:
-
您想让文本输入看起来像一个按钮吗?尝试使用输入类型=提交。或者让我们知道您希望看到的这些样式
-
每个浏览器对每个元素都有自己的默认样式。各种品牌的默认样式也略有不同。您可以使用 CSS Reset 来对齐不同浏览器中的所有样式。
-
使用 CSS 重置。网上很多