Home>Article>Web Front-end> How to set the color of the border in css
You can use the background-color attribute in css to change the color within the border. You only need to set the "background-color: color value" style to the input element. The background-color attribute sets the background color of the element. The value is the color name, hexadecimal value and RGB code.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Create html file and set page background color. Create h1 tag and content, create p tag and content, set border and border background color for h1 element. Sets the border and border background color for the p element.
document 这是一个标题
这是一个段落,这是一句话。
The effect is as follows:
Recommended learning:css video tutorial
The above is the detailed content of How to set the color of the border in css. For more information, please follow other related articles on the PHP Chinese website!