css reference

19
11/9/2015 CSS Reference http://www.w3schools.com/cssref/ 1/19 THE WORLD'S LARGEST WEB DEVELOPER SITE « W3Schools Home Next Reference » Color Background and Borders Basic Box Flexible Box Text Text Decoration Fonts Writing Modes Table Lists and Counters Animation Transform Transition Basic User Interface Multicolumn Paged Media Generated Content Filter Effects Image/Replaced Content CSS Reference W3Schools' CSS reference is tested regularly with all major browsers. CSS Properties CSS Property Groups

Upload: jeremiah-johns

Post on 09-Dec-2015

218 views

Category:

Documents


0 download

DESCRIPTION

CSS ReferenceCSS ReferenceCSS ReferenceCSS Reference

TRANSCRIPT

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 1/19

T H E   W O R L D ' S   L A R G E S T   W E B   D E V E L O P E R   S I T E

« W3Schools Home Next Reference »

ColorBackground and BordersBasic BoxFlexible BoxTextText DecorationFontsWriting ModesTableLists and CountersAnimationTransformTransitionBasic User InterfaceMulticolumnPaged MediaGenerated ContentFilter EffectsImage/Replaced Content

CSS Reference

W3Schools' CSS reference is tested regularly with all major browsers.

CSS Properties

CSS Property Groups

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 2/19

MaskingSpeechMarquee

The "CSS" column indicates in which CSS version the property is defined (CSS1,CSS2, or CSS3).

Color Properties

Property Description CSS

color Sets the color of text 1

opacity Sets the opacity level for an element 3

Background and Border Properties

Property Description CSS

background A shorthand property for setting all the backgroundproperties in one declaration

1

backgroundattachment

Sets whether a background image is fixed or scrollswith the rest of the page

1

backgroundcolor Specifies the background color of an element 1

backgroundimage Specifies one or more background images for anelement

1

backgroundposition

Specifies the position of a background image 1

backgroundrepeat Sets how a background image will be repeated 1

backgroundclip Specifies the painting area of the background 3

backgroundorigin Specifies where the background image(s) is/arepositioned

3

backgroundsize Specifies the size of the background image(s) 3

border Sets all the border properties in one declaration 1

borderbottom Sets all the bottom border properties in one 1

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 3/19

declaration

borderbottomcolor

Sets the color of the bottom border 1 

borderbottomleftradius

Defines the shape of the border of the bottomleftcorner

3

borderbottomrightradius

Defines the shape of the border of the bottomrightcorner

3

borderbottomstyle

Sets the style of the bottom border 1

borderbottomwidth

Sets the width of the bottom border 1

bordercolor Sets the color of the four borders 1

borderimage A shorthand property for setting all the borderimage*properties

3

borderimageoutset

Specifies the amount by which the border image areaextends beyond the border box

3

borderimagerepeat

Specifies whether the border image should berepeated, rounded or stretched

3

borderimageslice Specifies how to slice the border image 3

borderimagesource

Specifies the path to the image to be used as a border 3

borderimagewidth

Specifies the widths of the imageborder 3

borderleft Sets all the left border properties in one declaration 1

borderleftcolor Sets the color of the left border 1

borderleftstyle Sets the style of the left border 1

borderleftwidth Sets the width of the left border 1

borderradius A shorthand property for setting all the four border*radius properties

3

borderright Sets all the right border properties in one declaration 1

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 4/19

borderrightcolor Sets the color of the right border 1

borderrightstyle Sets the style of the right border 1

borderrightwidth Sets the width of the right border 1

borderstyle Sets the style of the four borders 1

bordertop Sets all the top border properties in one declaration 1

bordertopcolor Sets the color of the top border 1

bordertopleftradius

Defines the shape of the border of the topleft corner 3

bordertoprightradius

Defines the shape of the border of the topright corner 3

bordertopstyle Sets the style of the top border 1

bordertopwidth Sets the width of the top border 1

borderwidth Sets the width of the four borders 1

boxdecorationbreak

Sets the behaviour of the background and border of anelement at pagebreak, or, for inline elements, atlinebreak.

3

boxshadow Attaches one or more dropshadows to the box 3

Basic Box Properties

Property Description CSS

bottom Specifies the bottom position of a positioned element 2

clear Specifies which sides of an element where otherfloating elements are not allowed

1

clip Clips an absolutely positioned element 2

display Specifies how a certain HTML element should bedisplayed

1

float Specifies whether or not a box should float 1

height Sets the height of an element 1

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 5/19

left Specifies the left position of a positioned element 2

margin Sets all the margin properties in one declaration 1

marginbottom Sets the bottom margin of an element 1

marginleft Sets the left margin of an element 1

marginright Sets the right margin of an element 1

margintop Sets the top margin of an element 1

maxheight Sets the maximum height of an element 2

maxwidth Sets the maximum width of an element 2

minheight Sets the minimum height of an element 2

minwidth Sets the minimum width of an element 2

overflow Specifies what happens if content overflows anelement's box

2

overflowx Specifies whether or not to clip the left/right edges ofthe content, if it overflows the element's content area

3

overflowy Specifies whether or not to clip the top/bottom edgesof the content, if it overflows the element's contentarea

3

padding Sets all the padding properties in one declaration 1

paddingbottom Sets the bottom padding of an element 1

paddingleft Sets the left padding of an element 1

paddingright Sets the right padding of an element 1

paddingtop Sets the top padding of an element 1

position Specifies the type of positioning method used for anelement (static, relative, absolute or fixed)

2

right Specifies the right position of a positioned element 2

top Specifies the top position of a positioned element 2

visibility Specifies whether or not an element is visible 2

width Sets the width of an element 1

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 6/19

verticalalign Sets the vertical alignment of an element 1

zindex Sets the stack order of a positioned element 2

Flexible Box Layout

Property Description CSS

aligncontent Specifies the alignment between the lines inside aflexible container when the items do not use allavailable space

3

alignitems Specifies the alignment for items inside a flexiblecontainer

3

alignself Specifies the alignment for selected items inside aflexible container

3

flex Specifies the length of the item, relative to the rest 3

flexbasis Specifies the initial length of a flexible item 3

flexdirection Specifies the direction of the flexible items 3

flexflow A shorthand property for the flexdirection and theflexwrap properties

3

flexgrow Specifies how much the item will grow relative to therest

3

flexshrink Specifies how the item will shrink relative to the rest 3

flexwrap Specifies whether the flexible items should wrap or not 3

justifycontent Specifies the alignment between the items inside aflexible container when the items do not use allavailable space

3

order Sets the order of the flexible item, relative to the rest 3

Text Properties

Property Description CSS

hanging Specifies whether a punctuation character may be 3

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 7/19

punctuation placed outside the line box

hyphens Sets how to split words to improve the layout ofparagraphs

3

letterspacing Increases or decreases the space between charactersin a text

1

linebreak Specifies how/if to break lines 3

lineheight Sets the line height 1

overflowwrap Specifies whether or not the browser may break lineswithin words in order to prevent overflow (when astring is too long to fit its containing box)

3

tabsize Specifies the length of the tabcharacter 3

textalign Specifies the horizontal alignment of text 1

textalignlast Describes how the last line of a block or a line rightbefore a forced line break is aligned when textalign is"justify"

3

textcombineupright

Specifies the combination of multiple characters intothe space of a single character

3

textindent Specifies the indentation of the first line in a textblock 1

textjustify Specifies the justification method used when textalignis "justify"

3

texttransform Controls the capitalization of text 1

whitespace Specifies how whitespace inside an element ishandled

1

wordbreak Specifies line breaking rules for nonCJK scripts 3

wordspacing Increases or decreases the space between words in atext

1

wordwrap Allows long, unbreakable words to be broken and wrapto the next line

3

Text Decoration Properties

Property Description CSS

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 8/19

textdecoration Specifies the decoration added to text 1

textdecorationcolor

Specifies the color of the textdecoration 3

textdecorationline

Specifies the type of line in a textdecoration 3

textdecorationstyle

Specifies the style of the line in a text decoration 3

textshadow Adds shadow to text 3

textunderlineposition

Specifies the position of the underline which is setusing the textdecoration property

3

Font Properties

Property Description CSS

@fontface A rule that allows websites to download and use fontsother than the "websafe" fonts

3

@fontfeaturevalues

Allows authors to use a common name in fontvariantalternate for feature activated differently in OpenType

3

font Sets all the font properties in one declaration 1

fontfamily Specifies the font family for text 1

fontfeaturesettings

Allows control over advanced typographic features inOpenType fonts

3

fontkerning Controls the usage of the kerning information (howletters are spaced)

3

fontlanguageoverride

Controls the usage of languagespecific glyphs in atypeface

3

fontsize Specifies the font size of text 1

fontsizeadjust Preserves the readability of text when font fallbackoccurs

3

fontstretch Selects a normal, condensed, or expanded face from afont family

3

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 9/19

fontstyle Specifies the font style for text 1

fontsynthesis Controls which missing typefaces (bold or italic) maybe synthesized by the browser

3

fontvariant Specifies whether or not a text should be displayed in asmallcaps font

1

fontvariantalternates

Controls the usage of alternate glyphs associated toalternative names defined in @fontfeaturevalues

3

fontvariantcaps Controls the usage of alternate glyphs for capitalletters

3

fontvarianteastasian

Controls the usage of alternate glyphs for East Asianscripts (e.g Japanese and Chinese)

3

fontvariantligatures

Controls which ligatures and contextual forms are usedin textual content of the elements it applies to

3

fontvariantnumeric

Controls the usage of alternate glyphs for numbers,fractions, and ordinal markers

3

fontvariantposition

Controls the usage of alternate glyphs of smaller sizepositioned as superscript or subscript regarding thebaseline of the font

3

fontweight Specifies the weight of a font 1

Writing Modes Properties

Property Description CSS

direction Specifies the text direction/writing direction 2

textorientation Defines the orientation of the text in a line 3

textcombineupright

Specifies the combination of multiple characters intothe space of a single character

3

unicodebidi Used together with the direction property to set orreturn whether the text should be overridden tosupport multiple languages in the same document

2

writingmode 3

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 10/19

Table Properties

Property Description CSS

bordercollapse Specifies whether or not table borders should becollapsed

2

borderspacing Specifies the distance between the borders of adjacentcells

2

captionside Specifies the placement of a table caption 2

emptycells Specifies whether or not to display borders andbackground on empty cells in a table

2

tablelayout Sets the layout algorithm to be used for a table 2

Lists and Counters Properties

Property Description CSS

counterincrement Increments one or more counters 2

counterreset Creates or resets one or more counters 2

liststyle Sets all the properties for a list in one declaration 1

liststyleimage Specifies an image as the listitem marker 1

liststyleposition Specifies if the listitem markers should appear insideor outside the content flow

1

liststyletype Specifies the type of listitem marker 1

Animation Properties

Property Description CSS

@keyframes Specifies the animation code 3

animation A shorthand property for all the animation properties(except animationplaystate and animationfillmode)

3

animationdelay Specifies a delay for the start of an animation 3

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 11/19

animationdirection

Specifies whether or not the animation should play inreverse on alternate cycles

3

animationduration Specifies how many seconds or milliseconds ananimation takes to complete one cycle

3

animationfillmode

Specifies a style for the element when the animation isnot playing (when it is finished, or when it has a delay)

3

animationiterationcount

Specifies the number of times an animation should beplayed

3

animationname Specifies the name of the @keyframes animation 3

animationplaystate

Specifies whether the animation is running or paused 3

animationtimingfunction

Specifies the speed curve of an animation 3

Transform Properties

Property Description CSS

backfacevisibility Defines whether or not an element should be visiblewhen not facing the screen

3

perspective Specifies the perspective on how 3D elements areviewed

3

perspectiveorigin Specifies the bottom position of 3D elements 3

transform Applies a 2D or 3D transformation to an element 3

transformorigin Allows you to change the position on transformedelements

3

transformstyle Specifies how nested elements are rendered in 3Dspace

3

Transitions Properties

Property Description CSS

transition A shorthand property for setting the four transition 3

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 12/19

properties

transitionproperty Specifies the name of the CSS property the transitioneffect is for

3

transitionduration Specifies how many seconds or milliseconds atransition effect takes to complete

3

transitiontimingfunction

Specifies the speed curve of the transition effect 3

transitiondelay Specifies when the transition effect will start 3

Basic User Interface Properties

Property Description CSS

boxsizing Tells the browser what the sizing properties (width andheight) should include

3

content Used with the :before and :after pseudoelements, toinsert generated content

2

cursor Specifies the type of cursor to be displayed 2

imemode Controls the state of the input method editor for textfields

3

navdown Specifies where to navigate when using the arrowdown navigation key

3

navindex Specifies the tabbing order for an element 3

navleft Specifies where to navigate when using the arrowleftnavigation key

3

navright Specifies where to navigate when using the arrowrightnavigation key

3

navup Specifies where to navigate when using the arrowupnavigation key

3

outline Sets all the outline properties in one declaration 2

outlinecolor Sets the color of an outline 2

outlineoffset Offsets an outline, and draws it beyond the border 3

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 13/19

edge

outlinestyle Sets the style of an outline 2

outlinewidth Sets the width of an outline 2

resize Specifies whether or not an element is resizable by theuser

3

textoverflow Specifies what should happen when text overflows thecontaining element

3

Multi‐column Layout Properties

Property Description CSS

breakafter Specifies the page, column, or regionbreak behaviorafter the generated box

3

breakbefore Specifies the page, column, or regionbreak behaviorbefore the generated box

3

breakinside Specifies the page, column, or regionbreak behaviorinside the generated box

3

columncount Specifies the number of columns an element should bedivided into

3

columnfill Specifies how to fill columns 3

columngap Specifies the gap between the columns 3

columnrule A shorthand property for setting all the columnrule*properties

3

columnrulecolor Specifies the color of the rule between columns 3

columnrulestyle Specifies the style of the rule between columns 3

columnrulewidth Specifies the width of the rule between columns 3

columnspan Specifies how many columns an element should spanacross

3

columnwidth Specifies the width of the columns 3

columns A shorthand property for setting columnwidth andcolumncount

3

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 14/19

widows Sets the minimum number of lines that must be left atthe top of a page when a page break occurs inside anelement

2

Paged Media

Property Description CSS

orphans Sets the minimum number of lines that must be left atthe bottom of a page when a page break occurs insidean element

2

pagebreakafter Sets the pagebreaking behavior after an element 2

pagebreakbefore Sets the pagebreaking behavior before an element 2

pagebreakinside Sets the pagebreaking behavior inside an element 2

Generated Content for Paged Media

Property Description CSS

marks Adds crop and/or cross marks to the document 3

quotes Sets the type of quotation marks for embeddedquotations

2

Filter Effects Properties

Property Description CSS

filter Defines effects (e.g. blurring or color shifting) on anelement before the element is displayed

3

Image Values and Replaced Content

Property Description CSS

imageorientation Specifies a rotation in the right or clockwise directionthat a user agent applies to an image (This property islikely going to be deprecated and its functionality

3

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 15/19

moved to HTML)

imagerendering Gives a hint to the browser about what aspects of animage are most important to preserve when the imageis scaled

3

imageresolution Specifies the intrinsic resolution of all raster imagesused in/on the element

3

objectfit Specifies how the contents of a replaced elementshould be fitted to the box established by its usedheight and width

3

objectposition Specifies the alignment of the replaced element insideits box

3

Masking Properties

Property Description CSS

mask 3

masktype 3

Speech Properties

Property Description CSS

mark A shorthand property for setting the markbefore andmarkafter properties

3

markafter Allows named markers to be attached to the audiostream

3

markbefore Allows named markers to be attached to the audiostream

3

phonemes Specifies a phonetic pronunciation for the textcontained by the corresponding element

3

rest A shorthand property for setting the restbefore andrestafter properties

3

restafter Specifies a rest or prosodic boundary to be observedafter speaking an element's content

3

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 16/19

« W3Schools Home Next Reference »

restbefore Specifies a rest or prosodic boundary to be observedbefore speaking an element's content

3

voicebalance Specifies the balance between left and right channels 3

voiceduration Specifies how long it should take to render the selectedelement's content

3

voicepitch Specifies the average pitch (a frequency) of thespeaking voice

3

voicepitchrange Specifies variation in average pitch 3

voicerate Controls the speaking rate 3

voicestress Indicates the strength of emphasis to be applied 3

voicevolume Refers to the amplitude of the waveform output by thespeech synthesises

3

Marquee Properties

Property Description CSS

marqueedirection Sets the direction of the moving content 3

marqueeplaycount

Sets how many times the content move 3

marqueespeed Sets how fast the content scrolls 3

marqueestyle Sets the style of the moving content 3

W3SCHOOLS EXAMS

HTML, CSS, JavaScript, PHP, jQuery, and XML Certifications

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 18/19

Top 10 TutorialsHTML TutorialCSS Tutorial

JavaScript TutorialSQL TutorialPHP TutorialjQuery TutorialBootstrap TutorialAngular TutorialASP.NET TutorialXML Tutorial

Top 10 ReferencesHTML ReferenceCSS Reference

JavaScript ReferenceBrowser Statistics

HTML DOMPHP ReferencejQuery ReferenceHTML Colors

HTML Character SetsXML Reference

Top 10 ExamplesHTML ExamplesCSS Examples

JavaScript ExamplesHTML DOM Examples

PHP ExamplesjQuery ExamplesXML ExamplesASP ExamplesSVG Examples

Web CertificatesHTML CertificateHTML5 CertificateCSS Certificate

JavaScript CertificatejQuery CertificatePHP Certificate

Bootstrap CertificateXML Certificate

W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve readingand basic understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, butwe cannot warrant full correctness of all content. While using this site, you agree to have read and

accepted our terms of use, cookie and privacy policy. Copyright 19992015 by Refsnes Data. All Rights

11/9/2015 CSS Reference

http://www.w3schools.com/cssref/ 19/19

Reserved.