HTML 输入按钮 css-height 不适用于 Safari 和 Chrome [英] HTML input button css-height not working on Safari and Chrome
本文介绍了HTML 输入按钮 css-height 不适用于 Safari 和 Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个非常基本的问题.我将 html 表单提交按钮的高度设置为 50px.它适用于 Firefox,但不适用于 Chrome 或 Safari.代码如下:
I have a very basic question. I am setting height to 50px for my html form submit button. It works on Firefox but not Chrome nor Safari. The code is as simple as following:
<input type="submit" value="Send" style="height:50px;" />
知道如何让它在 Chrome 和 Safari 上运行吗?
Any idea how to make it work on Chrome and Safari?
推荐答案
将 改为
并添加
-webkit-appearance: none;
到 CSS 的开头,例如:
Change it from <input>
to <button>
and add -webkit-appearance: none;
to the start of your CSS, eg:
.submitbtn {
-webkit-appearance: none;
height: 50px;
background-color:#FFF;
color:#666;
font-weight:bold;
border: solid #666 1px;
font-size: 14px;
}
这篇关于HTML 输入按钮 css-height 不适用于 Safari 和 Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文