In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "sharing common attribute abbreviations of css". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The main rules for css abbreviations are as follows:
Color
A hexadecimal color value that can be abbreviated by half if every two bits are the same, for example:
# 000000 can be abbreviated to # 000 position 336699 or abbreviated to # 369
Box size
There are usually four ways to write:
Property:value1; means that all edges are one value value1
Property:value1 value2; indicates that the values of top and bottom are value1,right and left are value2
Property:value1 value2 value3; indicates that the value of top is value1,right and the value of left is value2,bottom. The value is value3.
Property:value1 value2 value3 value4
Four values represent top,right,bottom,left in turn
The convenient way to remember is clockwise, up, right, down, and left. Examples of specific applications in margin and padding are as follows:
Margin:1em 0 2em 0.5em
Border (border)
The properties of the border are as follows:
Border-width:1px
1.
Border-style:solid
two。
Border-color:#000
Reduced to one sentence: border:1px solid # 000
The syntax is border:width style color
Background (Backgrounds)
The properties of the background are as follows:
Background-color:#f00
1.
Background-image:url (background.gif)
two。
Background-repeat:no-repeat
3.
Background-attachment:fixed
4.
Background-position:0 0
Reduced to one sentence: background:#f00 url (background.gif) no-repeat fixed 00
The syntax is background:color image repeat attachment position
You can omit one or more of the property values. If omitted, the property value will use the browser default value, which is:
Color: transparent
1.
Image: none
two。
Repeat: repeat
3.
Attachment: scroll
4.
Position: 0%
Font (fonts)
The properties of the font are as follows:
Font-style:italic
1.
Font-variant:small-caps
two。
Font-weight:bold
3.
Font-size:1em
4.
Line-height:140%
5.
Font-family: "Lucida Grande", sans-serif
It can be abbreviated to one sentence: font:italic small-caps bold 1emcompany140% "Lucida Grande", sans-serif
Rule 1: the values of font-size and font-family must be declared. Rule 2: all values must be declared in the following order.
1. Font-weight, font-style, font-variant in no particular order
two。 And then font-size.
3. Finally, there is font-family.
Note that if you abbreviate the font definition, you should define at least two values, font-size and font-family.
List (lists)
Cancel the default dot and sequence number to write list-style:none like this
The attributes of list are:
List-style-type:square
1.
List-style-position:inside
two。
List-style-image:url (image.gif)
Can be abbreviated to one sentence: list-style:square inside url (image.gif)
That's all for sharing css acronyms. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.