不能让我的按钮看起来一样在不同的浏览器 [英] Can't make my button look the same in different browsers

查看:82
本文介绍了不能让我的按钮看起来一样在不同的浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是在网页设计非常好,我使用CSS创建了一个按钮,但我不知道如何使它看起来一样在不同的浏览器。

I am not very good at web design, I created a button using CSS but I don't know how to make it look the same in different browsers.

这是我用的按钮:

<input type="submit" class="randombutton" value="click here!"/>

这是我创建的CSS:

.randombutton {
   border-top: 1px solid #d1d425;
   background: #e6eb4c;
   background: -webkit-gradient(linear, left top, left bottom, from(#92b019), to(#e6eb4c));
   background: -webkit-linear-gradient(top, #92b019, #e6eb4c);
   background: -moz-linear-gradient(top, #92b019, #e6eb4c);
   background: -ms-linear-gradient(top, #92b019, #e6eb4c);
   background: -o-linear-gradient(top, #92b019, #e6eb4c);
   padding: 19px 38px;   
   border-radius: 40px;  
   color: white;
   font-size: 23px;
   font-family: Georgia, Serif;
   text-decoration: none;
   vertical-align: middle;
   display: block;
    margin-left: auto;
    margin-right: auto;
   }
.randombutton:hover {
    border-top-color: #c0df36;
   background: #c0df36;
   color: white;
   }
.randombutton:active {
   border-top-color: #9eb829;
   background: #9eb829;
   }

这是结果我在3个不同的浏览器获得:

This is the result I get in 3 different browsers:

此外,我想提一提,我不能在屏幕中间中间的按钮。

Also I would like to mention that I can't center the button in the middle of the screen.

按钮看起来应该像粘贴Chrome浏览器的图像。我将AP preciate一些帮助。

The button should look like the image for pasted for the Chrome browser. I'll appreciate some help.

推荐答案

与Internet Explorer&LT; 9不知道圆润的边角,你将不能够做到这一点在IE中,对于渐变更可能你会在每一个浏览器中得到不同的结果。

As internet explorer < 9 doesn't know about round corners you will not be able to do that in IE, as for gradient is more likely you will get different results in every browser.

最好的做法是使图像并添加自定义的设计,然后提交插入作为图像

The best practice is to make an image and add your custom design to it and then insert submit as an image

<input type="image" name="submit" src="http://www.example.org/images/my_submit_button.png" value="click here!" />

这篇关于不能让我的按钮看起来一样在不同的浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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