Use CSS to modify HTML button background color
The default value of the HTML button background color is relatively simple, especially when designing a web page with a special style, the texture is often not good enough, so web designers usually need to modify the HTML button background color to match the overall web page style. The best way to use the background color of the button is the built-in background-color property of CSS. This property is a standard function for modifying the background color of web page elements. It is supported by almost all mainstream browsers. The method of use is also very simple, that is, to modify the background color. Apply background-color to your HTML button, and then select the background color you want to use.
Introduction to Grammar
Actual application example
<input type="button" style="background-color:#FFFF78" value="This is the button with the background color #FFFF78"><br>
<input type="button" style="background-color:#FFD4D4" value="This is the button with the background color #FFD4D4"><br>
<input type="button" style="background-color:#C9FFC9" value="This is the button with the background color #C9FFC9"><br>
<input type="button" style="background-color:#C2C2FF" value="This is the button with the background color #C2C2FF">
Post a Comment
0 Comments