How to set text color in submit button?

大城市里の小女人 提交于 2019-12-03 15:39:39

问题


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.


回答1:


.button
{
    font-size: 13px;
    color:green;
}
<input type="submit" value="Fetch" class="button"/>



回答2:


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! ">



回答3:


<button id="fwdbtn" style="color:red">Submit</button> 



回答4:


Use this CSS:

color: red;

that's all.




回答5:


<input type = "button" style ="background-color:green"/>


来源:https://stackoverflow.com/questions/12471132/how-to-set-text-color-in-submit-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!