CSS Learning Notes

Source: Internet
Author: User

A. CSS background:background color: background-color: #00ff00, Yellow, Rob (0,0,0), Transparentbackground Image: Background-image:url (...)whether the background is duplicated: Background-repeat:repeat, No-repeat, repeat-y, Repeat-xPlace background Image: Background-position:center, 50px 100px, 10% 20%Fixed background image: Background-attachment:fixed

two. CSS text Instancestext color: color:red, #00ff00, RGB (0,0,0)character spacing: letter-spacing: -0.5em, 20pxdistance between rows: line-height:110%, 30px, 2alignment: Text-align:center, left, rightmodifier text: text-decoration:overline, Line-through, underline, Blink, noneindent text: text-indent:1cmalphabet Control: text-transform:uppercase, lowercase, capitalizeText wrapping: White-space:nowrapword spacing: word-spacing:30px, -0.5em

three. CSS Font instancestext font: Font-family:arial,verdana, Sans-seriffont Size: font-size:200%font style: Font-style:normal, italic, obliqueFont variant: Font-variantfont Weight: font-weight:normal, Bold,

four. CSS Borderborder Style: border-style:dotted, dashed, solid, double, groove, Ridge, inset, outsetBorder Width: border-width:thick, 5px 10px 1px [must be used with Border-style]border color: Border-color:yellowBottom Border Properties: Border-bottomBottom Border color: Border-bottom-colorBottom Border Style: Border-bottom-styleBottom Border Width: border-bottom-width(Border-top, Border-left, Border-right)

Five. CSS marginsleft margin: margin-left[right, top, bottom]margin: margin:2cm 4cm 3cm 4cm
six. css paddingPadding-bottom [Left, right, top]internal margin: padding:0.5cm, 2.5cm
Seven. CSS List Instancesdifferent types of unordered list tags: list-style-type:disc, circle, Square, nonedifferent types of ordered list tags: list-style-type:decimal, Lower-roman, Upper-roman, Lower-alpha, Upper-alphaimage list Item tag: List-style-image:url ()Placement List Location: List-style-position:inside, outside
Eight. Table InstancesLayout of table: table-layout:automatic, fixeddisplay empty cells in a table: Empty-cells:hideMerge table border: Border-collapse:collapse, separateBlank space between table borders: border-spacing:10px 50pxtable header position: Caption-side

Nine. Contourdraw line around element: outline: #00ff00 dotted thick;Contour Color: Outline-colorContour Width: outline-widthContour Style: Outline-style

10. CSS sizeHeight: height:auto, 160px,Widths: WidthMaximum height: max-heightMaximum width: max-widthmin. width: min-widthLine spacing: line-height
11. CSS ClassificationDisplay as inline element: Display:inlinenot displayed: Display:noneFloating Properties: Float:rightelement Visibility: visibility:visible, Hiddenchange cursor: Cursor:help,wait,text,auto,default,....clear the side of the element: Clear:right
12. CSS Positioningrelative positioning: position:relative left:20px Move right 20px relative to normal positionabsolute positioning: Position:absolutefixed positioning: position:fixedelement shape: Clip:rect (0px,20px,20px,20px)scroll bar display element overflow content: Overflow:scroll//hidden hidden//auto Autoimage Arrangement in text: Vertical-align:text-top, Text-bottom

13. Pseudo-ClassHyperlinks:A:linka:visiteda:hovera:activehover must be in link and visited after the active must be in hoveruse of focus: input:focus input box for FocusFirst-child First child element: Li:first-child, P:first-childFirst-line First lineFirst-letter First Letter

CSS Learning Notes

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.