CSS style Additions

Source: Internet
Author: User

CSS some common Properties *******0. Remove the underscore: text-decoration:none; 1. Underline: Text-decoration:underline;2. Adjusts the position of the text and picture (that is, the vertical alignment of the element): vertical-align:-20px;3. Margin: margin4. padding: padding5. Center; margin 0 auto; (centered on box only)  6 inline tags are not to be set to long-width, and sometimes you have to turn inline tags into block-level labels or block-level inline tags, which uses the display label.  1. Convert the inline tag to block-level tags: display:block;  2. Convert block-level labels to inline tags: display:inline;   3. Block-level inline tag: display;inline-block; Block-level inline labels can be as long-width as block-level, or 6 on a single line as inline. Hidden two methods: Display:none; #隐藏了会顶上去 Visibility:hidden;           #隐藏了不会顶上去7. Two ways to hide overflow: overflow:auto;  Overflow:scoll;   #带滚动条8. Text horizontally centered: Text-align:center;   Text is centered vertically: line-height;9. Pseudo class; 1. Before Access: a:link{color:red;}  2. Mouse hover: a:hover{color:green;}  3. After the visit: A:visited{color:yellow;}  4. Mouse click A:active{color:blue;}    5. In the P Tag property, add the content of C2 to the following p.c2:after{: ' Hello ';  color:red;    }6. In the P tag attribute for C2 's money face plus content p.c2:before{contents: ' La la la ';  color:red; }10.position Four attributes 1.static: Default position 2.fixed: Completely out of the document flow, fixed positioning (with Visual window as a reference) 3.relative: relative positioning (referring to their own position), not out of the document flow, no top up, Will keep his position motionless. You can use top left for positioning 4.absolute: Absolute positioning: Out of the document flow (referring to the parent that has been locatedLabel positioning, if not found to the body to find) attention!! : Set the positioning label to Absolute, set his parent label to the difference between the positioning label (relative) 11.float and position float: semi-detached document flow position: All out of document flow 12.z-index property sets the stacking order of elements. Elements that have a higher stacking order are always in front of elements that are lower in stacking order. 13. Transparency: opacity:0.4;14. Border Radian: border-radius:50%; #圆15. Remove the flag in front of the list: list-style:none;16. Align top and left topmost: padding:0; Margin:0;17. Font bold style: font-weight:900; 18. There are several logical expressions to be aware of the problem, below this and JS &&,| | The usage is the same as print (3 and 5) #两个为真才为真 print (0 and 3) #0是假就不判断后面了, directly into fake print (0 or 3) #有一个为真就为真 print (2 or 3) #2已经为真了那么就不会去判断后 Face.

CSS style Additions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.