html - 在 mozilla 中,我的按钮看起来不像在 chrome 中显示的那样好

标签 html css google-chrome browser mozilla

我想像 Chrome 一样在 Mozilla 中显示我的按钮,所以请帮助我如何处理它。 这是我的代码。

CSS:

.green {
     background: linear-gradient(to bottom, #9CD645 0%, #8AC530 100%) repeat scroll 0 0 rgba(0, 0, 0, 0);
     border: 1px solid #82B436;
}

.large {
     font-size: 18px;
}
.btn {
     border: 1px solid #82B436;
     border-radius: 25px;
     box-shadow: 0 1px rgba(99, 159, 8, 0.35);
     color: #508400;
     display: inline-block;
     font-weight: bold;
     padding: 3px 12px;
     text-decoration: none;
     text-transform: uppercase;
}

.green {
     background-color: #8CC63F;
 }

.btn span {
     background: url("images/icon_arrows.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
     display: block;
     float: right;
     height: 18px;
     margin: 5px;
     width: 18px;
}

HTML:

<a href="smoodees" class="btn large green">
    Check out our Smoodees
    <span></span>
</a>

最佳答案

检查这个 fiddle :

http://jsfiddle.net/realdeepak/gvC9z/1/

或者对于 firefox 中的浏览器兼容性,您可以像这样使用 css hack:

@-moz-document url-prefix() { 
  .large {
    font-size: 17px;
  }
}

或者试试这个,并根据您的屏幕修复次要的 css 填充对齐方式:

<style type="text/css">
 .green {
     background: linear-gradient(to bottom, #9CD645 0%, #8AC530 100%) repeat scroll 0 0 rgba(0, 0, 0, 0);
     border: 1px solid #82B436;
}

.large {
     font-size: 18px;
}
.btn {
border: 1px solid #82B436;
border-radius: 25px;
box-shadow: 0 1px rgba(99, 159, 8, 0.35);
color: #508400;
display: inline-block;
font-weight: bold;
padding: 3px 30px 3px 10px;
text-decoration: none;
text-transform: uppercase;
position: relative;
}

.green {
     background-color: #8CC63F;
 }

.btn span {
     background: url("images/icon_arrows.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
     height: 18px;
     margin: 5px;
     width: 18px;
     position: absolute;
     top: 0;
     right: 0;
}

</style>

关于html - 在 mozilla 中,我的按钮看起来不像在 chrome 中显示的那样好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21844610/

相关文章:

html - 在 Css Html 中的 5 div 下方插入带有覆盖 div 的文本

jquery - 从另一个 div 下滑动 div

javascript - 尝试从自定义下拉菜单中获取特定值

java - Selenium Chrome 驱动程序无法打开

html - 在伪元素在 chrome 和 firefox 上出现不同之前

jquery - 在鼠标悬停时显示 PNG 的不同部分

html - twitter bootstrap input-group-addon 和 btn-group 没有很好地对齐

javascript - 在价格计算中添加复选框

javascript - 使用 jQuery 添加元素后刷新 css

android - 在 PWA 中,虚拟键盘与 html 元素重叠,在移动 chrome 浏览器中则不会