<div class = "signupsubmit">Continue</div>
<style>
.signupsubmit {
line-height: 32px;
position: absolute;
left: 36px;
top: 527px;
font-family: arial;
font-size: 17px;
font-weight: 600;
width: 137px;
height: 30px;
border-color: #00297A;
border-radius: 4px;
border: 1px;
border-style: solid;
background-color: #FFB630;
text-indent: 30px;
}
</style>
我试图改变文字颜色为黑色,但保留边框颜色相同的,所以这是我做过什么如何改变文字颜色股利不改变边框颜色
<div class = "signupsubmit">Continue</div>
<style>
.signupsubmit {
line-height: 32px;
position: absolute;
left: 36px;
top: 527px;
font-family: arial;
font-size: 17px;
font-weight: 600;
width: 137px;
height: 30px;
border-color: #00297A;
border-radius: 4px;
border: 1px;
border-style: solid;
background-color: #FFB630;
text-indent: 30px;
color: white; <!-- NEW LINE OF CODE -->
}
</style>
我做color:white
,但它也将边框颜色更改为白色。我想保持边框颜色为黑色。
@ kannan:不需要。速记'border'将'border-color'设置覆盖为默认值。所有需要的是将'border-color'移动到'border:1px'下,或者'border:1px'改变为'border-width:1px'。 – Harry