In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to set the color and length of Css", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to set the color and length of Css" this article.
There are also many ways to set colors:
English command color, p {color:red;}
RG colors, p {color:rgb (133 dint 45200);} and p {color:rgb (20% pr 33% pr 25%);}
Hexadecimal color, this color setting method is now more commonly used method, its principle is also RGB setting, but the value of each item from 0255 to hexadecimal 00-ff. P {color:#00ffff;} (when you set the color is hexadecimal color value, if every two-bit value is the same, can be abbreviated by half, # 0ff) RGB color table reference RGB color comparison table-online tools-open source China or RGB color table length unit summary, currently more commonly used to px (pixels), em,% percentage, to note that these three units are relative units.
Pixel
Em is the font-size value of the font given in this element
%%
Set up tips
Horizontal Center Settin
Inline elements. If the element is set to inline elements such as text, pictures, etc., horizontal centering is achieved by setting text-align:center to the parent element.
Fixed width block element (the width width of block element is a fixed value). Elements that meet the conditions of fixed width and block can be centered by setting the "left and right margin" value to auto.
Variable width block element.
Add the table tag (including,) and set "left and right margin Center" for the table
Set the display: inline method: similar to the first, set the display type to the inline element, and then use text-align:center to center the effect, setting the properties of the variable width element.
Set the float and position:relative; left:50%, child elements to position:relative and left:-50% for the parent element to center horizontally.
Vertical Center Settin
A single line of text that is highly determined by the parent element. This is achieved by setting the height and line-height of the parent element to be highly consistent. (height: the height of the element; line-height: line height (line spacing), as the name implies, refers to the distance between lines in text and the baseline between lines.
Multiline text that is highly determined by the parent element. Use the insert table (including tbody, tr, td) tags and set the vertical-align:middle.
In addition, setting one of the following two attributes for the element will invisibly change the display type, and the display display type of the element will automatically be displayed as display:inline-block (block element). Of course, you can set the width and height of the element, and the default width does not occupy the parent element.
Position: absolute
Float: left or float:right
The above is all the content of the article "how to set the color and length of Css". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow 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.