In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor would like to share with you the relevant knowledge points about color is a new attribute of css3. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look.
Color is not a new property of css3, and the color property has been used in css1; the color property is used to specify the color of the text, which can be set using the color name, hexadecimal character, RGB (red, green and blue), RGBA, HSL (hue, saturation, lightness), and the HSLA method.
The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.
Is color a new attribute for css3?
Color is not a new property of css3
Color version: CSS1
The color attribute specifies the color of the text.
This property sets the foreground color of an element (in the HTML representation, the color of the element's text); the raster image is not affected by color. This color is also applied to all borders of the element unless overridden by border-color or some other border color attribute.
The easiest way to set the foreground color of an element is to use the color attribute.
Color values can be set in the following ways:
The name of the color, such as red, blue, brown, lightseagreen, etc., is not case-sensitive.
The hexadecimal symbols # RRGGBB and # RGB (for example, # ff0000). "#" is followed by 6 or 3 hexadecimal characters (0-9, Amurf).
RGB, red-green-blue (red-green-blue (RGB)) specifies that the color value is the color of the rgb code, and the function format is rgb (R _ Magi G _ (B)). The value can be an integer or a percentage of 0-255.
RGBA, Red-Green-Blue-Alpha (RGBa) RGBa extends the RGB color model, which includes alpha channels that allow you to set the transparency of a color. A means transparency: 0 = transparent; 1 = opaque.
HSL, hue-saturation-luminance (Hue-saturation-lightness) hue (Hue) represents the angle of the color ring (that is, a ring that represents a rainbow).
Saturation and lightness are expressed as percentages.
100% is full saturation, while 0% is a grayscale.
100% lightness is white, 0% lightness is black, and 50% lightness is "average".
HSLA, Hue-saturation-Luminance-HSLa (HSLa) HSLa extends from the HSL color model and includes alpha channels that specify the transparency of a color. A means transparency: 0 = transparent; 1 = opaque.
Examples are as follows:
Body {color: # 92a8d1;} body {color: rgb;} body {color: rgba);} body {color: hsl (120100%);} body {color: hsla (240100% 50,0.7);}
The output is as follows:
These are all the contents of the article "is color a new attribute of css3?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.