SlideShare a Scribd company logo
1 of 5
Download to read offline
CSS Cheat Sheet
Cascading Style Sheets (CSS) is a style sheet language used for describing the
presentation of a document written in a markup language like HTML. CSS Cheat
Sheets are a reference for CSS goodness.
by lam
󰅂Selectors
Universal Selector
* {}
ID Selector
#id {}
Class Selector
.class {}
Type Selector
h1, h2 ,h3 {}
Adjacent Sibling Selector
h1 + p {}
Child Selector
ul > li {}
General Sibling Selector
h1 ~ p {}
Descendant Selector
p a {}
Attribute Selector
div[attribute="SomeValu
e"] {}
󰅂
Pseudo Selectors
& Elements
Mouse Over Selector
a:hover {}
Visited Links Selector
a:visited {}
Disabled elements selector
input:disabled {}
First Line Selector
p::first-line {}
Last Child Selector
p:last-child {}
First Element of its Parent
Selector
p:first-of-type {}
After Element
.class::after {}
Active Link Selector
a:active {}
Link Selector
.class:link {}
Enabled elements selector
input:enabled {}
First Letter Selector
p::first-letter {}
󰅂Text Styling
Font style
font-style: normal | it
alic | oblique
Vertical Alignment
vertical-align: baselin
e | 10px | sub | super
| top | text-top | midd
le | bottom | text-bott
om | initial
Space Between Characters
letter-spacing: normal
| 4px
Text Align Last
text-align-last: auto
| left | right | cente
r | justify | start | e
nd | initial | inherit
Font Family
font-family: 'Open San
s', sans-serif
Text Shadow
text-shadow: h-shadow v
-shadow blur-radius col
or | none | initial | i
nherit
Font Variant
font-variant: normal |
small-caps
Text Transform
text-transform: capital
ise | lowercase | upper
󰅂Position
Position
position: static | rela
tive | absolute | fixe
d | sticky
󰏪
󰅢
Only Child Selector
p:only-child {}
Elements that have no
Children Selector
p:empty {}
Focus Selector
input:focus {}
Checked elements selector
input:checked {}
Not a Speci ed Element
Selector
:not(p) {}
First Child Selector
p:first-child {}
:nth-child Selector
p:nth-child() {}
Before Element
.class::before {}
case
Line Height
line-height: normal | 3
em | 34%
Text Decoration
text-decoration: none
| underline | overline
| line-through
Text Justify
text-justify: auto | in
ter-word | inter-charac
ter | none | initial |
inherit
Font Weight
font-weight: normal | b
old | bolder | lighter
| 100 - 900
Font Size
font-size: 12px | 0.8e
m | 80%
Horizontal Alignment
text-align: left | righ
t | center | justify
Indent First Line
text-indent: 25px
Text Over ow
text-overflow: clip | e
llipsis | string | init
ial | inherit
Clear Floating Elements
clear: none | left | ri
ght | both
Position Properties
top | right | bottom |
left
Z Index
z-index: 3 | auto | inh
erit
Float Element
float: left | right | n
one
󰅂Background
Background Image
background-image: url()
Background Color
background-color: #2AA9
E0
Background Repeat
background-repeat: repe
at-x | repeat-y | repea
t | space | round | no-
repeat
Background Attachment
background-attachment:
scroll | fixed | local
| initial | inherit
Background Position
background-position: to
p | right | bottom | le
ft | center
󰅂Box Properties
Box Sizing
box-sizing: border-box
| content-box
Border Color
border-color: #2AA9E0
Margin
margin: 2px 4px 6px 8p
x | 0 auto
Border Style
border-style: none | hi
dden | dotted | dashed
| solid | double | groo
ve | ridge | inset | ou
tset
Padding
󰅂List Styling
List Type
list-style-type: disc
| circle | square | non
e
List Position
list-style-position: in
side | outside
󰅂
Flex Direction
flex-direction: row | r
ow-reverse | column | c
olumn-reverse
󰏪
󰅢
padding: 2px 4px 6px 8p
x
Border Width
border-width: 10px
List Image
list-style-image: url()
Flex Wrap
flex-wrap: nowrap | wra
p | wrap-reverse
Justify Content
justify-content: flex-s
tart | flex-end | cente
r | space-between | spa
ce-around | space-evenl
y
Align Items
align-items: flex-star
t | flex-end | center
| baseline | stretch
Align Content
align-content: flex-sta
rt | flex-end | center
| space-between | space
-around | stretch
Order
order: 0
Flex Grow
flex-grow: 0
Flex Shrink
flex-shrink: 1
Flex Basis
flex-basis: 3px | auto
Align Self
align-self: auto | flex
-start | flex-end | cen
ter | baseline | stretc
h
󰅂CSS Grid
Grid Template Columns
grid-template-columns:
40px 50px auto 50px 40p
x
Grid Template Rows
grid-template-rows: 2
5% 100px auto
Grid Template Areas
grid-template-areas:
"a b c" | none
Grid Template
grid-template: "a a a"
20% "b b b" auto | 100p
x 1fr / 50px 1fr
Grid Column Gap
grid-column-gap: 10px
Grid Row Gap
grid-row-gap: 10px
Justify Items
justify-items: start |
end | center | stretch
Align Items
align-items: start | en
d | center | stretch
Justify Content
justify-content: flex-s
tart | flex-end | cente
r | space-between | spa
ce-around | space-evenl
y
Align Content
align-content: flex-sta
󰅂Dynamic Content
CSS Variable
--variable-name: value
Variable Usage
var(--variable-name)
Counter Reset
counter-reset: name-of-
counter
Counter Increment
counter-increment: name
-of-counter
Counter Dynamic Value
content: counter(name-o
f-counter)
Attribute Dynamic Value
content: attr(name-of-a
ttribute)
󰏪
󰅢
rt | flex-end | center
| space-between | space
-around | stretch
Grid Auto Columns
grid-auto-columns: 100p
x | max-content | min-c
ontent
Grid Auto Rows
grid-auto-rows: 100px
| max-content | min-con
tent
Grid Auto Flow
grid-auto-flow: row | c
olumn | row dense | col
umn dense
Grid Column Start
grid-column-start: 2 |
areaname | span 2 | spa
n areaname | auto
Grid Column End
grid-column-end: 2 | ar
eaname | span 2 | span
areaname | auto
Grid Row Start
grid-row-start: 2 | are
aname | span 2 | span a
reaname | auto
Grid Row End
grid-row-end: 2 | arean
ame | span 2 | span are
aname | auto
Grid Column
grid-column: 3 / span 2
Grid Row
grid-row: 3 / span 2
Justify Self
justify-self: start | e
nd | center | stretch
󰏪
󰅢
CheatSheetMaker.com SimpleCheatSheet.com
Align Self
align-self: start | en
d | center | stretch
󰏪
󰅢

More Related Content

Similar to Css cheat sheet

Similar to Css cheat sheet (20)

CSS LINE HEIGHT
CSS LINE HEIGHTCSS LINE HEIGHT
CSS LINE HEIGHT
 
CSS Notes in PDF, Easy to understand. For beginner to advanced. ...
CSS Notes in PDF, Easy to understand. For beginner to advanced.              ...CSS Notes in PDF, Easy to understand. For beginner to advanced.              ...
CSS Notes in PDF, Easy to understand. For beginner to advanced. ...
 
Css 101
Css 101Css 101
Css 101
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Css
CssCss
Css
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
Stylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStartStylesheets for Online Help - Scott DeLoach, ClickStart
Stylesheets for Online Help - Scott DeLoach, ClickStart
 
Cascading style sheets - CSS
Cascading style sheets - CSSCascading style sheets - CSS
Cascading style sheets - CSS
 
Css2
Css2Css2
Css2
 
Css2
Css2Css2
Css2
 
Chapter 13: Colors and Backgrounds
Chapter 13: Colors and BackgroundsChapter 13: Colors and Backgrounds
Chapter 13: Colors and Backgrounds
 
IT2255 Web Essentials - Unit II Web Designing
IT2255 Web Essentials - Unit II  Web DesigningIT2255 Web Essentials - Unit II  Web Designing
IT2255 Web Essentials - Unit II Web Designing
 
Basic css
Basic cssBasic css
Basic css
 
CSS for basic learner
CSS for basic learnerCSS for basic learner
CSS for basic learner
 
CSS for Developers
CSS for DevelopersCSS for Developers
CSS for Developers
 
Cascading Style Sheet presentation .pptx
Cascading Style Sheet presentation .pptxCascading Style Sheet presentation .pptx
Cascading Style Sheet presentation .pptx
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)CSS_Day_Two (W3schools)
CSS_Day_Two (W3schools)
 
css-ppt.pdf
css-ppt.pdfcss-ppt.pdf
css-ppt.pdf
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
 

More from Lam Hoang

Py spark cheat sheet by cheatsheetmaker.com
Py spark cheat sheet by cheatsheetmaker.comPy spark cheat sheet by cheatsheetmaker.com
Py spark cheat sheet by cheatsheetmaker.comLam Hoang
 
VS Code cheat sheet
VS Code cheat sheetVS Code cheat sheet
VS Code cheat sheetLam Hoang
 
PostgreSql cheat sheet
PostgreSql cheat sheetPostgreSql cheat sheet
PostgreSql cheat sheetLam Hoang
 
Nginx cheat sheet
Nginx cheat sheetNginx cheat sheet
Nginx cheat sheetLam Hoang
 
MySql cheat sheet
MySql cheat sheetMySql cheat sheet
MySql cheat sheetLam Hoang
 
Html cheat sheet
Html cheat sheetHtml cheat sheet
Html cheat sheetLam Hoang
 
Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheetLam Hoang
 
Django cheat sheet
Django cheat sheetDjango cheat sheet
Django cheat sheetLam Hoang
 
Apache cheat sheet
Apache cheat sheetApache cheat sheet
Apache cheat sheetLam Hoang
 
Battle chatter minecraft 1.4.7 mod
Battle chatter minecraft 1.4.7 modBattle chatter minecraft 1.4.7 mod
Battle chatter minecraft 1.4.7 modLam Hoang
 
On thi dai_hoc_mon_van_2010 (1)
On thi dai_hoc_mon_van_2010 (1)On thi dai_hoc_mon_van_2010 (1)
On thi dai_hoc_mon_van_2010 (1)Lam Hoang
 
ôn thi môn văn
ôn thi môn vănôn thi môn văn
ôn thi môn vănLam Hoang
 
On thi dai_hoc_mon_van_2010
On thi dai_hoc_mon_van_2010On thi dai_hoc_mon_van_2010
On thi dai_hoc_mon_van_2010Lam Hoang
 
giáo trình c căn bản
giáo trình c căn bảngiáo trình c căn bản
giáo trình c căn bảnLam Hoang
 

More from Lam Hoang (14)

Py spark cheat sheet by cheatsheetmaker.com
Py spark cheat sheet by cheatsheetmaker.comPy spark cheat sheet by cheatsheetmaker.com
Py spark cheat sheet by cheatsheetmaker.com
 
VS Code cheat sheet
VS Code cheat sheetVS Code cheat sheet
VS Code cheat sheet
 
PostgreSql cheat sheet
PostgreSql cheat sheetPostgreSql cheat sheet
PostgreSql cheat sheet
 
Nginx cheat sheet
Nginx cheat sheetNginx cheat sheet
Nginx cheat sheet
 
MySql cheat sheet
MySql cheat sheetMySql cheat sheet
MySql cheat sheet
 
Html cheat sheet
Html cheat sheetHtml cheat sheet
Html cheat sheet
 
Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheet
 
Django cheat sheet
Django cheat sheetDjango cheat sheet
Django cheat sheet
 
Apache cheat sheet
Apache cheat sheetApache cheat sheet
Apache cheat sheet
 
Battle chatter minecraft 1.4.7 mod
Battle chatter minecraft 1.4.7 modBattle chatter minecraft 1.4.7 mod
Battle chatter minecraft 1.4.7 mod
 
On thi dai_hoc_mon_van_2010 (1)
On thi dai_hoc_mon_van_2010 (1)On thi dai_hoc_mon_van_2010 (1)
On thi dai_hoc_mon_van_2010 (1)
 
ôn thi môn văn
ôn thi môn vănôn thi môn văn
ôn thi môn văn
 
On thi dai_hoc_mon_van_2010
On thi dai_hoc_mon_van_2010On thi dai_hoc_mon_van_2010
On thi dai_hoc_mon_van_2010
 
giáo trình c căn bản
giáo trình c căn bảngiáo trình c căn bản
giáo trình c căn bản
 

Recently uploaded

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 

Css cheat sheet

  • 1. CSS Cheat Sheet Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS Cheat Sheets are a reference for CSS goodness. by lam 󰅂Selectors Universal Selector * {} ID Selector #id {} Class Selector .class {} Type Selector h1, h2 ,h3 {} Adjacent Sibling Selector h1 + p {} Child Selector ul > li {} General Sibling Selector h1 ~ p {} Descendant Selector p a {} Attribute Selector div[attribute="SomeValu e"] {} 󰅂 Pseudo Selectors & Elements Mouse Over Selector a:hover {} Visited Links Selector a:visited {} Disabled elements selector input:disabled {} First Line Selector p::first-line {} Last Child Selector p:last-child {} First Element of its Parent Selector p:first-of-type {} After Element .class::after {} Active Link Selector a:active {} Link Selector .class:link {} Enabled elements selector input:enabled {} First Letter Selector p::first-letter {} 󰅂Text Styling Font style font-style: normal | it alic | oblique Vertical Alignment vertical-align: baselin e | 10px | sub | super | top | text-top | midd le | bottom | text-bott om | initial Space Between Characters letter-spacing: normal | 4px Text Align Last text-align-last: auto | left | right | cente r | justify | start | e nd | initial | inherit Font Family font-family: 'Open San s', sans-serif Text Shadow text-shadow: h-shadow v -shadow blur-radius col or | none | initial | i nherit Font Variant font-variant: normal | small-caps Text Transform text-transform: capital ise | lowercase | upper 󰅂Position Position position: static | rela tive | absolute | fixe d | sticky 󰏪 󰅢
  • 2. Only Child Selector p:only-child {} Elements that have no Children Selector p:empty {} Focus Selector input:focus {} Checked elements selector input:checked {} Not a Speci ed Element Selector :not(p) {} First Child Selector p:first-child {} :nth-child Selector p:nth-child() {} Before Element .class::before {} case Line Height line-height: normal | 3 em | 34% Text Decoration text-decoration: none | underline | overline | line-through Text Justify text-justify: auto | in ter-word | inter-charac ter | none | initial | inherit Font Weight font-weight: normal | b old | bolder | lighter | 100 - 900 Font Size font-size: 12px | 0.8e m | 80% Horizontal Alignment text-align: left | righ t | center | justify Indent First Line text-indent: 25px Text Over ow text-overflow: clip | e llipsis | string | init ial | inherit Clear Floating Elements clear: none | left | ri ght | both Position Properties top | right | bottom | left Z Index z-index: 3 | auto | inh erit Float Element float: left | right | n one 󰅂Background Background Image background-image: url() Background Color background-color: #2AA9 E0 Background Repeat background-repeat: repe at-x | repeat-y | repea t | space | round | no- repeat Background Attachment background-attachment: scroll | fixed | local | initial | inherit Background Position background-position: to p | right | bottom | le ft | center 󰅂Box Properties Box Sizing box-sizing: border-box | content-box Border Color border-color: #2AA9E0 Margin margin: 2px 4px 6px 8p x | 0 auto Border Style border-style: none | hi dden | dotted | dashed | solid | double | groo ve | ridge | inset | ou tset Padding 󰅂List Styling List Type list-style-type: disc | circle | square | non e List Position list-style-position: in side | outside 󰅂 Flex Direction flex-direction: row | r ow-reverse | column | c olumn-reverse 󰏪 󰅢
  • 3. padding: 2px 4px 6px 8p x Border Width border-width: 10px List Image list-style-image: url() Flex Wrap flex-wrap: nowrap | wra p | wrap-reverse Justify Content justify-content: flex-s tart | flex-end | cente r | space-between | spa ce-around | space-evenl y Align Items align-items: flex-star t | flex-end | center | baseline | stretch Align Content align-content: flex-sta rt | flex-end | center | space-between | space -around | stretch Order order: 0 Flex Grow flex-grow: 0 Flex Shrink flex-shrink: 1 Flex Basis flex-basis: 3px | auto Align Self align-self: auto | flex -start | flex-end | cen ter | baseline | stretc h 󰅂CSS Grid Grid Template Columns grid-template-columns: 40px 50px auto 50px 40p x Grid Template Rows grid-template-rows: 2 5% 100px auto Grid Template Areas grid-template-areas: "a b c" | none Grid Template grid-template: "a a a" 20% "b b b" auto | 100p x 1fr / 50px 1fr Grid Column Gap grid-column-gap: 10px Grid Row Gap grid-row-gap: 10px Justify Items justify-items: start | end | center | stretch Align Items align-items: start | en d | center | stretch Justify Content justify-content: flex-s tart | flex-end | cente r | space-between | spa ce-around | space-evenl y Align Content align-content: flex-sta 󰅂Dynamic Content CSS Variable --variable-name: value Variable Usage var(--variable-name) Counter Reset counter-reset: name-of- counter Counter Increment counter-increment: name -of-counter Counter Dynamic Value content: counter(name-o f-counter) Attribute Dynamic Value content: attr(name-of-a ttribute) 󰏪 󰅢
  • 4. rt | flex-end | center | space-between | space -around | stretch Grid Auto Columns grid-auto-columns: 100p x | max-content | min-c ontent Grid Auto Rows grid-auto-rows: 100px | max-content | min-con tent Grid Auto Flow grid-auto-flow: row | c olumn | row dense | col umn dense Grid Column Start grid-column-start: 2 | areaname | span 2 | spa n areaname | auto Grid Column End grid-column-end: 2 | ar eaname | span 2 | span areaname | auto Grid Row Start grid-row-start: 2 | are aname | span 2 | span a reaname | auto Grid Row End grid-row-end: 2 | arean ame | span 2 | span are aname | auto Grid Column grid-column: 3 / span 2 Grid Row grid-row: 3 / span 2 Justify Self justify-self: start | e nd | center | stretch 󰏪 󰅢
  • 5. CheatSheetMaker.com SimpleCheatSheet.com Align Self align-self: start | en d | center | stretch 󰏪 󰅢