Html 如何在提交按钮中设置文本颜色?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12471132/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 02:53:12 来源:igfitidea点击:
How to set text color in submit button?
提问by Venkata Krishna
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.
当我尝试更改提交按钮的颜色时遇到问题。
回答by mtk
.button
{
font-size: 13px;
color:green;
}
<input type="submit" value="Fetch" class="button"/>
回答by Jerry Thomsan
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! ">
回答by Jerry Thomsan
<button id="fwdbtn" style="color:red">Submit</button>
回答by Marcus
Use this CSS:
使用这个 CSS:
color: red;
that's all.
就这样。
回答by Jayita Roy
<input type = "button" style ="background-color:green"/>