How to set text color in submit button?

2019-03-17 06:58发布

I tried to change the color of the text in the submit button type but, I don't know why I am not able to change it.

.button {
  width: 105px;
  height: 20px;
  background-image: url('tiny.gif');
  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');
}
<input type="submit" value="Fetch" class="button" />

I was getting a problem when I tried to change the color of the submit button.

5条回答
爷、活的狠高调
2楼-- · 2019-03-17 07:06
<button id="fwdbtn" style="color:red">Submit</button> 
查看更多
Luminary・发光体
3楼-- · 2019-03-17 07:08

Use this CSS:

color: red;

that's all.

查看更多
再贱就再见
4楼-- · 2019-03-17 07:13
.button {
    color: green;
}

jsFiddle Live Demo

查看更多
淡お忘
5楼-- · 2019-03-17 07:18

you try this:

<input type="submit" style="font-face: 'Comic Sans MS'; font-size: larger; color: teal; background-color: #FFFFC0; border: 3pt ridge lightgrey" value=" Send Me! ">
查看更多
对你真心纯属浪费
6楼-- · 2019-03-17 07:21
<input type = "button" style ="background-color:green"/>
查看更多
登录 后发表回答