In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge points about the definition of color in css. 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.
Color name
CSS offers more than 140 color names, from the most basic colors to some of the richer colors can be said to be rich and colorful.
Body {color:black;}
A {color:orange;}
The above example is defined by a specific color name, but because the color name is difficult to remember, and you may want a very specific color, the color name may not be easy to use. Let's take a look at other ways to define colors.
RGB
Computer monitors, televisions and mobile phones all use the RGB color model to display colors. Basically, each color is defined by a combination of red, green and blue. Red, green, or blue have 256 possible values. Because the computer counts from 0 (zero), the maximum value is 255.
Considering that the color is the result of a combination of red, green, and blue, and because each of the three colors has 256 possible values, colors can be used.
Because the RGB model is directly related to the way colors are physically rendered, it has become a CSS color unit.
For example, you can define red as 219 red, 78 green, and 68 blue:
A {color:rgb (219 and 78);}
Black is not red, green, or blue:
Body {color:rgb (0J 0J 0);}
On the other side of the spectrum, white is the total amount of each red, green and blue:
Body {color:rgb (255255255);}
RGBA
The rgba color unit is rgb, which is the alpha value we added (ranging from 0 to 1, in decimal values), which defines what the color transparency is:
Body {color:rgba
Slightly transparent black.
The purpose of color transparency is to blend with the background, so it looks slightly different depending on the context. It is especially useful for background colors.
HSL and HSLA
HSL is another way to define colors. Think of it as a color wheel.
These are all the contents of the article "what are the ways of defining colors in css?" 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.