解决方法
梯度将在.btn- *类(假设您使用按钮下拉列表).
例如(使用btn-primary):
.btn-primary { color: #ffffff; text-shadow: 0 -1px 0 rgba(0,0.25); background-color: #006dcc; *background-color: #0044cc; background-image: -moz-linear-gradient(top,#0088cc,#0044cc); background-image: -webkit-gradient(linear,0 0,0 100%,from(#0088cc),to(#0044cc)); background-image: -webkit-linear-gradient(top,#0044cc); background-image: -o-linear-gradient(top,#0044cc); background-image: linear-gradient(to bottom,#0044cc); background-repeat: repeat-x; border-color: #0044cc #0044cc #002a80; border-color: rgba(0,0.1) rgba(0,0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); }
要删除渐变,您只需删除background-color除以外的所有背景属性(包括底部的过滤器):
.btn-primary { color: #ffffff; text-shadow: 0 -1px 0 rgba(0,0.25); background-color: #006dcc; border-color: #0044cc #0044cc #002a80; border-color: rgba(0,0.25); }
您也想使用单色边框完成:
.btn-primary { color: #ffffff; text-shadow: 0 -1px 0 rgba(0,0.25); background-color: #006dcc; border-color: #0044cc; }
您还需要为.btn – *:hover,:focus和:活动样式做同样的操作.