HTML输入按钮CSS的高度不工作的Safari和Chrome [英] HTML input button css-height not working on Safari and Chrome

查看:219
本文介绍了HTML输入按钮CSS的高度不工作的Safari和Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常基本的问题。我设置高度,以50像素为我的html表单提交按钮。它的工作原理在Firefox而不是Chrome浏览器Safari浏览器也。在code是简单如下:

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?

推荐答案

&LT改变它code>并添加 -webkit-外观:无; 你的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的高度不工作的Safari和Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆