<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