In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what are the basic attributes of Css, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
I. tag attributes and styles
1. The content of the web page corresponds to the tag according to the function you want.
2. Find the corresponding tag, click on the box to see the prompt, and select the corresponding word (or style) to describe the tag.
Can directly type out we become attribute (attribute), similar to fonts in color and so on.
What can't be typed out is called detail, or rather, style Style.
Chongwei private land
TIPS: styles control the presentation of tags more accurately and more variously than attributes
2. CSS introduction:
Cascading [Kæ s'ke has a cascading style sheet] Style Sheet.
3. Selector:
1. Tag selector
Controls the corresponding tag through the keyword of the tag.
Test text
Abc
Def
/ * tag selector * /
Font {
Color:red
Font-size:20px
Font-family: Chinese Xingkai
}
TIPS: all corresponding tags will take effect, some of which do not want to take effect and need to be used
2. Class selector
Test text
Abc
Def
/ * Class selector, start with. Select a device name definition, and then use that definition to add class= "define class selector name" * / to the tag
.c1 {
Color:red
Font-size:20px
}
.c2 {
Color:blue
Font-size:30px
}
3. ID selector
Test text
Abc
Def
/ * ID selector, defined with the name of # selector, and the corresponding tag is called through ID * /
# c1 {
Color:green
Font-size:18px
}
TIPS: it is recommended that ID selectors should not be used repeatedly; try to reduce the definition and use of ID selectors to avoid code conflicts.
IV. Mode of use of CSS
1. Inline: find the corresponding tag and use style= to "describe".
2. Embedded: by sneaking into
3, outside the chain: first write the inline, and then the embedded style code is cut into a separate CSS file (named to be consistent with the corresponding foreground page), and the foreground page is deleted and written in.
TIPS:
1. In external files, you can @ charset "gbk"
5. CSS priority:
1. Attributes and styles, style first
2. In-line > in-line > outer chain
6. Examples of commonly used attribute styles of fonts:
Size: size, default is 3, default 12PX, you can use + zoom in,-zoom out, no more than + 7, excess will be displayed as maximum or minimum
Color Color: # ffffff red rgba (0Pol 0255255)
Font size font-size: unit size (pixel px)
Font weight: font-weight
Font embellishment text-decoration: the same styles of underline, line-through, overline and none cannot be used many times, and the general solution for reuse is nesting.
Abc
Uppercase and lowercase text-transform: capitalize initials uppercase uppercase lowercase lowercase is not valid for Chinese.
Homework: write 3 paragraphs of English, each paragraph, the first English word is converted to uppercase.
Single line text line height line-height
Some people are doing something.
Some people are doing something.
These are all the contents of the article "what are the basic attributes 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.