CSS basics
Use CSS to modify the HTML button text color
The default button text color of HTML button is usually black. It does not mean that black button text color is not good, but sometimes, when a web designer designs a unique overall page, the text color on the button is also It should be presented with the overall web design. How to modify the button text color of the HTML button ? Web designers can use the text color provided by CSS to modify the attributes, that is, color to make such a design. Let's take a look at the two key basic syntaxes first, and then apply them together in the example to see the effect.
Basic syntax
HTML button button syntax (for detailed usage please refer to: HTML button button )
<input type="button" value="button name">
CSS text color color syntax (for detailed usage, please refer to: CSS color text color )color: color;
With the above two grammars, we can apply them together. Please see the actual application of the example.Use CSS to modify HTML button text color example
<input type="button" value="blue button text" style="color:blue;">
<input type="button" value="red button text" style="color:red;">
< input type="button" value="green button text" style="color:green;">
Example output<input type="button" value="red button text" style="color:red;">
< input type="button" value="green button text" style="color:green;">
Post a Comment
0 Comments