我正在尝试将颜色更改强制为表单提交的默认按钮。我知道这种风格在线并不是最好的方法,但我只是为了测试目的,一旦我有它工作,我就会进入我的CSS。
有关我需要采取哪些不同措施以强制改变颜色的建议?提前谢谢。
<style type="text/css">
.button
{
width:205px;
height: 25px;
color: #bda935;
line-height: 20px;
padding-bottom: 2px;
vertical-align: middle;
font-family: "Lucida Grande", Geneva, Verdana, Arial, Helvetica, sans-serif;
font-size: 13px;
<!--font-weight: bold;-->
text-transform: none;
border:1px solid transparent;
}
.button:hover
{
background-image:url('tiny_.gif');
}
</style>
<form action = "Contact Us.cshtml">
<input type="submit" class="button" value="Request More Information">
</form>
答案 0 :(得分:0)
这是我发现的工作。
我需要在我的背景颜色之后添加!important:我的CSS中的#bda935。所以,它现在看起来像这样:
.button
{
width:205px;
height: 25px;
background-color: #bda935 !important;
color: #bda935;
line-height: 20px;
padding-bottom: 2px;
vertical-align: middle;
font : 10pt 'Century Gothic';
color : #000000;
font-size: 13px;
<!--font-weight: bold;-->
text-transform: none;
border:1px solid transparent;
}