我想在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>
答案 0 :(得分:2)
查看这个小提琴:
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>
答案 1 :(得分:0)
完全改变答案。
试试这个结构:
&lt; a href =“smoodees”class =“btn large green”&gt; &lt; p id =“text”&gt;查看我们的Smoodees&lt; / p&gt; &LT;跨度&GT;&LT; /跨度&GT; &LT; / A&GT;
并像这样更改CSS:
#ID { 向左飘浮 }
跨度{ 向左飘浮 }
编辑:对于多个按钮,请将ID更改为Class