CSS

来自康健生活
Kangkk​(留言 | 贡献)2022年12月9日 (五) 09:41的版本 (→CSS all property)

返回上一级

目录

CSSOM

cssom

CSS all property

ED [Editors' Draft (not a W3C Technical Report)]
FPWD First Public Working Draft
WD Working Draft
CR Candidate Recommendation
CRD Candidate Recommendation Draft
PR Proposed Recommendation
REC Recommendation
NOTE Working Group Note

属性列表。

--* ED 应用
-webkit-line-clamp ED 应用
accent-color ED 应用
align-content ED 应用
align-items ED 应用
align-self ED 应用
alignment-baseline ED 应用
all ED 应用
animation ED 应用
animation-delay ED 应用
animation-delay-end ED 应用
animation-delay-start ED 应用
animation-direction ED 应用
animation-duration ED 应用
animation-fill-mode ED 应用
animation-iteration-count ED 应用
animation-name ED 应用
animation-play-state ED 应用
animation-range ED 应用
animation-timing-function ED 应用
appearance ED 应用
aspect-ratio ED 应用
azimuth REC 应用
backface-visibility ED 应用
background REC 应用
background-attachment REC 应用
background-blend-mode ED 应用
background-clip ED 应用
background-color REC 应用
background-image REC 应用
background-origin ED 应用
background-position REC 应用
background-repeat REC 应用
background-size ED 应用
baseline-shift ED 应用
baseline-source ED 应用
block-ellipsis ED 应用
block-size ED 应用
block-step ED 应用
block-step-align ED 应用
block-step-insert ED 应用
block-step-round ED 应用
block-step-size ED 应用
bookmark-label ED 应用
bookmark-level ED 应用
bookmark-state ED 应用
border REC 应用
border-block ED 应用
border-block-color ED 应用
border-block-end ED 应用
border-block-end-color ED 应用
border-block-end-style ED 应用
border-block-end-width ED 应用
border-block-start ED 应用
border-block-start-color ED 应用
border-block-start-style ED 应用
border-block-start-width ED 应用
border-block-style ED 应用
border-block-width ED 应用
border-bottom REC 应用
border-bottom-color REC 应用
border-bottom-left-radius ED 应用
border-bottom-right-radius ED 应用
border-bottom-style REC 应用
border-bottom-width REC 应用
border-boundary ED 应用
border-collapse REC 应用
border-color REC 应用
border-end-end-radius ED 应用
border-end-start-radius ED 应用
border-image ED 应用
border-image-outset ED 应用
border-image-repeat ED 应用
border-image-slice ED 应用
border-image-source ED 应用
border-image-width ED 应用
border-inline ED 应用
border-inline-color ED 应用
border-inline-end ED 应用
border-inline-end-color ED 应用
border-inline-end-style ED 应用
border-inline-end-width ED 应用
border-inline-start ED 应用
border-inline-start-color ED 应用
border-inline-start-style ED 应用
border-inline-start-width ED 应用
border-inline-style ED 应用
border-inline-width ED 应用
border-left REC 应用
border-left-color REC 应用
border-left-style REC 应用
border-left-width REC 应用
border-radius ED 应用
border-right REC 应用
border-right-color REC 应用
border-right-style REC 应用
border-right-width REC 应用
border-spacing REC 应用
border-start-end-radius ED 应用
border-start-start-radius ED 应用
border-style REC 应用
border-top REC 应用
border-top-color REC 应用
border-top-left-radius ED 应用
border-top-right-radius ED 应用
border-top-style REC 应用
border-top-width REC 应用
border-width REC 应用
bottom REC 应用
box-decoration-break ED 应用
box-shadow ED 应用
box-sizing ED 应用
box-snap ED 应用
break-after ED 应用
break-before ED 应用
break-inside ED 应用
caption-side REC 应用
caret ED 应用
caret-color ED 应用
caret-shape ED 应用
chains ED 应用
clear REC 应用
clip REC 应用
clip-path ED 应用
clip-rule ED 应用
color REC 应用
color-adjust ED 应用
color-interpolation-filters ED 应用
color-scheme ED 应用
column-count ED 应用
column-fill ED 应用
column-gap ED 应用
column-rule ED 应用
column-rule-color ED 应用
column-rule-style ED 应用
column-rule-width ED 应用
column-span ED 应用
column-width ED 应用
columns ED 应用
contain ED 应用
contain-intrinsic-block-size ED 应用
contain-intrinsic-height ED 应用
contain-intrinsic-inline-size ED 应用
contain-intrinsic-size ED 应用
contain-intrinsic-width ED 应用
container ED 应用
container-name ED 应用
container-type ED 应用
content REC 应用
content-visibility ED 应用
continue ED 应用
counter-increment REC 应用
counter-reset REC 应用
counter-set ED 应用
cue REC 应用
cue-after REC 应用
cue-before REC 应用
cursor REC 应用
direction REC 应用
display REC 应用
dominant-baseline ED 应用
elevation REC 应用
empty-cells REC 应用
fill ED 应用
fill-break ED 应用
fill-color ED 应用
fill-image ED 应用
fill-opacity ED 应用
fill-origin ED 应用
fill-position ED 应用
fill-repeat ED 应用
fill-rule ED 应用
fill-size ED 应用
filter ED 应用
flex ED 应用
flex-basis ED 应用
flex-direction ED 应用
flex-flow ED 应用
flex-grow ED 应用
flex-shrink ED 应用
flex-wrap ED 应用
float REC 应用
float-defer ED 应用
float-offset ED 应用
float-reference ED 应用
flood-color ED 应用
flood-opacity ED 应用
flow ED 应用
flow-from ED 应用
flow-into ED 应用
font REC 应用
font-family REC 应用
font-feature-settings ED 应用
font-kerning ED 应用
font-language-override ED 应用
font-optical-sizing ED 应用
font-palette ED 应用
font-size REC 应用
font-size-adjust ED 应用
font-stretch ED 应用
font-style REC 应用
font-synthesis ED 应用
font-synthesis-small-caps ED 应用
font-synthesis-style ED 应用
font-synthesis-weight ED 应用
font-variant REC 应用
font-variant-alternates ED 应用
font-variant-caps ED 应用
font-variant-east-asian ED 应用
font-variant-emoji ED 应用
font-variant-ligatures ED 应用
font-variant-numeric ED 应用
font-variant-position ED 应用
font-variation-settings ED 应用
font-weight REC 应用
footnote-display ED 应用
footnote-policy ED 应用
forced-color-adjust ED 应用
gap ED 应用
glyph-orientation-vertical ED 应用
grid ED 应用
grid-area ED 应用
grid-auto-columns ED 应用
grid-auto-flow ED 应用
grid-auto-rows ED 应用
grid-column ED 应用
grid-column-end ED 应用
grid-column-start ED 应用
grid-row ED 应用
grid-row-end ED 应用
grid-row-start ED 应用
grid-template ED 应用
grid-template-areas ED 应用
grid-template-columns ED 应用
grid-template-rows ED 应用
hanging-punctuation ED 应用
height REC 应用
hyphenate-character ED 应用
hyphenate-limit-chars ED 应用
hyphenate-limit-last ED 应用
hyphenate-limit-lines ED 应用
hyphenate-limit-zone ED 应用
hyphens ED 应用
image-orientation ED 应用
image-rendering ED 应用
image-resolution ED 应用
initial-letter ED 应用
initial-letter-align ED 应用
initial-letter-wrap ED 应用
inline-size ED 应用
inline-sizing ED 应用
input-security ED 应用
inset ED 应用
inset-block ED 应用
inset-block-end ED 应用
inset-block-start ED 应用
inset-inline ED 应用
inset-inline-end ED 应用
inset-inline-start ED 应用
isolation ED 应用
justify-content ED 应用
justify-items ED 应用
justify-self ED 应用
leading-trim ED 应用
left REC 应用
letter-spacing REC 应用
lighting-color ED 应用
line-break ED 应用
line-clamp ED 应用
line-grid ED 应用
line-height REC 应用
line-height-step ED 应用
line-padding ED 应用
line-snap ED 应用
list-style REC 应用
list-style-image REC 应用
list-style-position REC 应用
list-style-type REC 应用
margin REC 应用
margin-block ED 应用
margin-block-end ED 应用
margin-block-start ED 应用
margin-bottom REC 应用
margin-break ED 应用
margin-inline ED 应用
margin-inline-end ED 应用
margin-inline-start ED 应用
margin-left REC 应用
margin-right REC 应用
margin-top REC 应用
margin-trim ED 应用
marker ED 应用
marker-end ED 应用
marker-knockout-left ED 应用
marker-knockout-right ED 应用
marker-mid ED 应用
marker-pattern ED 应用
marker-segment ED 应用
marker-side ED 应用
marker-start ED 应用
mask ED 应用
mask-border ED 应用
mask-border-mode ED 应用
mask-border-outset ED 应用
mask-border-repeat ED 应用
mask-border-slice ED 应用
mask-border-source ED 应用
mask-border-width ED 应用
mask-clip ED 应用
mask-composite ED 应用
mask-image ED 应用
mask-mode ED 应用
mask-origin ED 应用
mask-position ED 应用
mask-repeat ED 应用
mask-size ED 应用
mask-type ED 应用
max-block-size ED 应用
max-height REC 应用
max-inline-size ED 应用
max-lines ED 应用
max-width REC 应用
min-block-size ED 应用
min-height REC 应用
min-inline-size ED 应用
min-intrinsic-sizing ED 应用
min-width REC 应用
mix-blend-mode ED 应用
nav-down ED 应用
nav-left ED 应用
nav-right ED 应用
nav-up ED 应用
object-fit ED 应用
object-position ED 应用
offset ED 应用
offset-anchor ED 应用
offset-distance ED 应用
offset-path ED 应用
offset-position ED 应用
offset-rotate ED 应用
opacity ED 应用
order ED 应用
orphans REC 应用
outline REC 应用
outline-color REC 应用
outline-offset ED 应用
outline-style REC 应用
outline-width REC 应用
overflow REC 应用
overflow-anchor ED 应用
overflow-block ED 应用
overflow-clip-margin ED 应用
overflow-inline ED 应用
overflow-wrap ED 应用
overflow-x ED 应用
overflow-y ED 应用
overscroll-behavior ED 应用
overscroll-behavior-block ED 应用
overscroll-behavior-inline ED 应用
overscroll-behavior-x ED 应用
overscroll-behavior-y ED 应用
padding REC 应用
padding-block ED 应用
padding-block-end ED 应用
padding-block-start ED 应用
padding-bottom REC 应用
padding-inline ED 应用
padding-inline-end ED 应用
padding-inline-start ED 应用
padding-left REC 应用
padding-right REC 应用
padding-top REC 应用
page ED 应用
page-break-after REC 应用
page-break-before REC 应用
page-break-inside REC 应用
pause REC 应用
pause-after REC 应用
pause-before REC 应用
perspective ED 应用
perspective-origin ED 应用
pitch REC 应用
pitch-range REC 应用
place-content ED 应用
place-items ED 应用
place-self ED 应用
play-during REC 应用
pointer-events ED 应用
position REC 应用
print-color-adjust ED 应用
property-name ED 应用
quotes REC 应用
region-fragment ED 应用
resize ED 应用
rest ED 应用
rest-after ED 应用
rest-before ED 应用
richness REC 应用
right REC 应用
rotate ED 应用
row-gap ED 应用
ruby-align ED 应用
ruby-merge ED 应用
ruby-overhang ED 应用
ruby-position ED 应用
running ED 应用
scale ED 应用
scroll-behavior ED 应用
scroll-margin ED 应用
scroll-margin-block ED 应用
scroll-margin-block-end ED 应用
scroll-margin-block-start ED 应用
scroll-margin-bottom ED 应用
scroll-margin-inline ED 应用
scroll-margin-inline-end ED 应用
scroll-margin-inline-start ED 应用
scroll-margin-left ED 应用
scroll-margin-right ED 应用
scroll-margin-top ED 应用
scroll-padding ED 应用
scroll-padding-block ED 应用
scroll-padding-block-end ED 应用
scroll-padding-block-start ED 应用
scroll-padding-bottom ED 应用
scroll-padding-inline ED 应用
scroll-padding-inline-end ED 应用
scroll-padding-inline-start ED 应用
scroll-padding-left ED 应用
scroll-padding-right ED 应用
scroll-padding-top ED 应用
scroll-snap-align ED 应用
scroll-snap-stop ED 应用
scroll-snap-type ED 应用
scroll-timeline ED 应用
scroll-timeline-axis ED 应用
scroll-timeline-name ED 应用
scrollbar-color ED 应用
scrollbar-gutter ED 应用
scrollbar-width ED 应用
shape-image-threshold ED 应用
shape-inside ED 应用
shape-margin ED 应用
shape-outside ED 应用
spatial-navigation-action ED 应用
spatial-navigation-contain ED 应用
spatial-navigation-function ED 应用
speak REC 应用
speak-as ED 应用
speak-header REC 应用
speak-numeral REC 应用
speak-punctuation REC 应用
speech-rate REC 应用
stress REC 应用
string-set ED 应用
stroke ED 应用
stroke-align ED 应用
stroke-alignment ED 应用
stroke-break ED 应用
stroke-color ED 应用
stroke-dash-corner ED 应用
stroke-dash-justify ED 应用
stroke-dashadjust ED 应用
stroke-dasharray ED 应用
stroke-dashcorner ED 应用
stroke-dashoffset ED 应用
stroke-image ED 应用
stroke-linecap ED 应用
stroke-linejoin ED 应用
stroke-miterlimit ED 应用
stroke-opacity ED 应用
stroke-origin ED 应用
stroke-position ED 应用
stroke-repeat ED 应用
stroke-size ED 应用
stroke-width ED 应用
tab-size ED 应用
table-layout REC 应用
text-align REC 应用
text-align-all ED 应用
text-align-last ED 应用
text-combine-upright ED 应用
text-decoration REC 应用
text-decoration-color ED 应用
text-decoration-line ED 应用
text-decoration-skip ED 应用
text-decoration-skip-box ED 应用
text-decoration-skip-ink ED 应用
text-decoration-skip-inset WD 应用
text-decoration-skip-self ED 应用
text-decoration-skip-spaces ED 应用
text-decoration-style ED 应用
text-decoration-thickness ED 应用
text-decoration-trim ED 应用
text-edge ED 应用
text-emphasis ED 应用
text-emphasis-color ED 应用
text-emphasis-position ED 应用
text-emphasis-skip ED 应用
text-emphasis-style ED 应用
text-group-align ED 应用
text-indent REC 应用
text-justify ED 应用
text-orientation ED 应用
text-overflow ED 应用
text-shadow ED 应用
text-space-collapse ED 应用
text-space-trim ED 应用
text-spacing ED 应用
text-transform REC 应用
text-underline-offset ED 应用
text-underline-position ED 应用
text-wrap ED 应用
top REC 应用
transform ED 应用
transform-box ED 应用
transform-origin ED 应用
transform-style ED 应用
transition ED 应用
transition-delay ED 应用
transition-duration ED 应用
transition-property ED 应用
transition-timing-function ED 应用
translate ED 应用
unicode-bidi REC 应用
user-select ED 应用
vertical-align REC 应用
view-timeline ED 应用
view-timeline-axis ED 应用
view-timeline-inset ED 应用
view-timeline-name ED 应用
view-transition-name ED 应用
visibility REC 应用
voice-balance ED 应用
voice-duration ED 应用
voice-family REC 应用
voice-pitch ED 应用
voice-range ED 应用
voice-rate ED 应用
voice-stress ED 应用
voice-volume ED 应用
volume REC 应用
white-space REC 应用
widows REC 应用
width REC 应用
will-change ED 应用
word-boundary-detection ED 应用
word-boundary-expansion ED 应用
word-break ED 应用
word-spacing REC 应用
word-wrap ED 应用
wrap-after ED 应用
wrap-before ED 应用
wrap-flow ED 应用
wrap-inside ED 应用
wrap-through ED 应用
writing-mode ED 应用
z-index REC 应用
all-space-treatment CR 未应用
background-break WD 未应用
background-image-transform FPWD 未应用
background-quantity LC 未应用
background-spacing LC 未应用
bikeshedding WD 未应用
bleed WD 未应用
block-overflow WD 未应用
block-progression CR 未应用
bookmark-target WD 未应用
border-break WD 未应用
border-image-transform FPWD 未应用
border-length WD 未应用
box-align WD 未应用
box-break LC 未应用
box-direction WD 未应用
box-flex WD 未应用
box-flex-group WD 未应用
box-height WD 未应用
box-lines WD 未应用
box-ordinal-group WD 未应用
box-orient WD 未应用
box-pack WD 未应用
box-suppress WD 未应用
box-width WD 未应用
caret-animation FPWD 未应用
clear-after WD 未应用
clipPath WD 未应用
color-profile CR 未应用
column-break-after WD 未应用
column-break-before WD 未应用
content-order WD 未应用
crop WD 未应用
display-box FPWD 未应用
display-extras FPWD 未应用
display-inside WD 未应用
display-list WD 未应用
display-model WD 未应用
display-outside WD 未应用
display-role WD 未应用
enable-background WD 未应用
feBlend WD 未应用
feColorMatrix WD 未应用
feComponentTransfer WD 未应用
feComposite WD 未应用
feConvolveMatrix WD 未应用
feCustom WD 未应用
feCustomParam WD 未应用
feCustomSource WD 未应用
feDiffuseLighting WD 未应用
feDisplacementMap WD 未应用
feDistantLight WD 未应用
feDropShadow WD 未应用
feFlood WD 未应用
feFuncA WD 未应用
feFuncB WD 未应用
feFuncG WD 未应用
feFuncR WD 未应用
feGaussianBlur WD 未应用
feImage WD 未应用
feMerge WD 未应用
feMergeNode WD 未应用
feMorphology WD 未应用
feOffset WD 未应用
fePointLight WD 未应用
feSpecularLighting WD 未应用
feSpotLight WD 未应用
feTile WD 未应用
feTurbulence WD 未应用
feUnsharpMask WD 未应用
filter-margin WD 未应用
filter-margin-bottom WD 未应用
filter-margin-left WD 未应用
filter-margin-right WD 未应用
filter-margin-top WD 未应用
fit LC 未应用
fit-position LC 未应用
flex-align WD 未应用
flex-item-align WD 未应用
flex-line-pack WD 未应用
flex-order WD 未应用
flex-pack WD 未应用
float-displace WD 未应用
float-displace--alternative-2 WD 未应用
float-displace--alternative-3 WD 未应用
font-max-size WD 未应用
font-min-size WD 未应用
font-presentation FPWD 未应用
glyph-orientation-horizontal CR 未应用
grid-after WD 未应用
grid-auto-position WD 未应用
grid-before WD 未应用
grid-cell WD 未应用
grid-cell-stacking WD 未应用
grid-column-align WD 未应用
grid-column-gap CR 未应用
grid-column-position WD 未应用
grid-column-sizing WD 未应用
grid-column-span WD 未应用
grid-columns WD 未应用
grid-definition-columns WD 未应用
grid-definition-rows WD 未应用
grid-end WD 未应用
grid-flow WD 未应用
grid-gap CR 未应用
grid-position WD 未应用
grid-row-align WD 未应用
grid-row-gap CR 未应用
grid-row-position WD 未应用
grid-row-sizing WD 未应用
grid-row-span WD 未应用
grid-rows WD 未应用
grid-span WD 未应用
grid-start WD 未应用
hyphenate WD 未应用
hyphenate-after WD 未应用
hyphenate-before WD 未应用
hyphenate-dictionary WD 未应用
hyphenate-limit-after WD 未应用
hyphenate-limit-before WD 未应用
hyphenate-lines WD 未应用
hyphenate-resource WD 未应用
icon LC 未应用
ime-mode LC 未应用
indent-edge-reset WD 未应用
initial-letters WD 未应用
initial-letters-align WD 未应用
initial-letters-wrap WD 未应用
kerning-mode CR 未应用
kerning-pair-threshold CR 未应用
key-equivalent LC 未应用
leading-trim-over WD 未应用
leading-trim-under WD 未应用
line-grid-mode CR 未应用
line-grid-progression CR 未应用
line-sizing WD 未应用
line-slack FPWD 未应用
linefeed-treatment CR 未应用
mark WD 未应用
mark-after WD 未应用
mark-before WD 未应用
marks WD 未应用
marquee WD 未应用
marquee-direction LC 未应用
marquee-loop WD 未应用
marquee-play-count LC 未应用
marquee-repetition WD 未应用
marquee-speed LC 未应用
marquee-style LC 未应用
mask-box WD 未应用
mask-box-image LC 未应用
mask-box-image-outset LC 未应用
mask-box-image-repeat LC 未应用
mask-box-image-slice LC 未应用
mask-box-image-source LC 未应用
mask-box-image-width LC 未应用
mask-box-outset WD 未应用
mask-box-repeat WD 未应用
mask-box-slice WD 未应用
mask-box-source WD 未应用
mask-box-width WD 未应用
mask-source-type WD 未应用
max-font-size CR 未应用
max-zoom WD 未应用
min-font-size CR 未应用
min-zoom WD 未应用
motion FPWD 未应用
motion-offset FPWD 未应用
motion-path FPWD 未应用
motion-rotation FPWD 未应用
move-to WD 未应用
nav-index LC 未应用
offset-after WD 未应用
offset-before WD 未应用
offset-end WD 未应用
offset-start WD 未应用
orientation WD 未应用
overflow-clip WD 未应用
overflow-style LC 未应用
page-policy CR 未应用
page-transition-tag FPWD 未应用
phonemes WD 未应用
polar-anchor WD 未应用
polar-angle WD 未应用
polar-distance WD 未应用
polar-origin WD 未应用
presentation-level WD 未应用
punctuation-trim WD 未应用
region-overflow WD 未应用
rendering-intent CR 未应用
resizer WD 未应用
resolution WD 未应用
rotation WD 未应用
rotation-point WD 未应用
scroll-snap-coordinate FPWD 未应用
scroll-snap-destination FPWD 未应用
scroll-snap-margin CR 未应用
scroll-snap-margin-block CR 未应用
scroll-snap-margin-block-end CR 未应用
scroll-snap-margin-block-start CR 未应用
scroll-snap-margin-bottom CR 未应用
scroll-snap-margin-inline CR 未应用
scroll-snap-margin-inline-end CR 未应用
scroll-snap-margin-inline-start CR 未应用
scroll-snap-margin-left CR 未应用
scroll-snap-margin-right CR 未应用
scroll-snap-margin-top CR 未应用
scroll-snap-padding WD 未应用
scroll-snap-padding-block WD 未应用
scroll-snap-padding-block-end WD 未应用
scroll-snap-padding-block-start WD 未应用
scroll-snap-padding-bottom WD 未应用
scroll-snap-padding-inline WD 未应用
scroll-snap-padding-inline-end WD 未应用
scroll-snap-padding-inline-start WD 未应用
scroll-snap-padding-left WD 未应用
scroll-snap-padding-right WD 未应用
scroll-snap-padding-top WD 未应用
scroll-snap-points-x FPWD 未应用
scroll-snap-points-y FPWD 未应用
size WD 未应用
something-or-other WD 未应用
speakability WD 未应用
tab-side WD 未应用
target WD 未应用
target-name WD 未应用
target-new WD 未应用
target-position WD 未应用
text-align-first WD 未应用
text-autospace WD 未应用
text-blink CR 未应用
text-block-indent LC 未应用
text-combine WD 未应用
text-combine-horizontal LC 未应用
text-combine-mode WD 未应用
text-decoration-width FPWD 未应用
text-first-indent LC 未应用
text-justify-trim CR 未应用
text-kashida-space CR 未应用
text-line-through CR 未应用
text-line-through-color CR 未应用
text-line-through-mode CR 未应用
text-line-through-style CR 未应用
text-line-through-width CR 未应用
text-outline WD 未应用
text-overflow-ellipsis CR 未应用
text-overflow-mode CR 未应用
text-overline CR 未应用
text-overline-color CR 未应用
text-overline-mode CR 未应用
text-overline-style CR 未应用
text-overline-width CR 未应用
text-replace WD 未应用
text-script CR 未应用
text-trim WD 未应用
text-underline CR 未应用
text-underline-color CR 未应用
text-underline-mode CR 未应用
text-underline-style CR 未应用
text-underline-width CR 未应用
user-zoom WD 未应用
var-* LC 未应用
vertical-position WD 未应用
voice-pitch-range WD 未应用
white-space-collapse WD 未应用
white-space-collapsing WD 未应用
white-space-treatment CR 未应用
word-break-cjk CR 未应用
word-break-inside CR 未应用
wrap WD 未应用
wrap-margin WD 未应用
wrap-option CR 未应用
wrap-padding WD 未应用
zoom WD 未应用

引言

CSS 特性,层叠性、继承性和特殊性。

单位

标题文字 标题文字 标题文字
百分比 示例 示例
rem 示例 示例
em 示例 示例
pt 示例 示例
px 示例 示例
in 示例 示例

布局

BFC Flex 浮动
stacking context IFC 等高布局
示例 示例 示例

属性

position visibility vertical-align box-shadow
box-sizing font 伪类 pointer-events
transform translate transition animation

word

word-break word-wrap table-layout

函数

calc 示例 示例
示例 示例 示例
示例 示例 示例

变形

拉伸 示例 示例
示例 示例 示例
示例 示例 示例

盒模型

假设参数 w=width,b=border,p=padding,c=content,计算盒模型。


块级元素示意图为  

标准盒模型(Standards 盒模型)

box-sizing: content-box;

标准盒模型计算公式为 w=c,示意图为   。

怪异盒模型(Quirks 盒模型,IE 盒模型)

box-sizing: border-box;

怪异盒模型计算公式为 w=2∗(b+p)+c,示意图为   。

文档流

基线

布局

水平布局 垂直布局 居中布局 两列布局 三列布局 双飞翼布局
等分布局 等高布局 多列布局 全屏布局 卡片布局 网格布局
流动布局 浮动布局 位置布局 表格布局 圣杯布局 瀑布流布局

布局工具

layoutit build layoutit cssgrid-generator vue-grid-generator csslayout griddy

画图

画圆 三角形 path
示例 示例 示例
示例 示例 示例

关键字

蒙层 文档流 字体
解析方向 层叠上下文 隐藏文本
css联动 文本 阴影

问题

margin合并 示例 示例
示例 示例 示例
示例 示例 示例

命名方案

BEM scoped css css modules
css-in-js OOCSS SMACSS
ACSS 示例 示例

项目方案

askgo 示例 示例
示例 示例 示例
示例 示例 示例

CSS

CSS Level 1

REC-CSS1-19961217 REC-CSS1-19990111 REC-CSS1-20080411

CSS Level 2

REC-CSS2-20110607 WD-CSS22-20160412

CSS Level 3

CSS3

CSS Level 4 and beyond

CSS Now

CSS Snapshot 2017

备注

语法糖

cssnext CSS in JS 示例
示例 示例 示例
示例 示例 示例

方案

栅格

栅格布局

1010 示例

标签

span div img
示例 示例 示例
示例 示例 示例

动效

进度条 示例 示例
示例 示例 示例
示例 示例 示例

默认

user agent stylesheet 示例 示例
示例 示例 示例
示例 示例 示例

加载方式

js异步加载CSS 分步渲染 Firefixing
hack flexbox 示例 示例
示例 示例 示例

预处理器

sass 示例 示例
less 示例 示例
stylus 示例 示例

事件

事件

hack

雪碧图(css sprite) 示例 示例
示例 示例 示例
示例 示例 示例

other

autoprefixer postcss

error

  • 相邻元素margin的自动合并与float
  • margin塌陷
  • h3 标签的 margin-top 自动与父亲节点合并
    父亲节点设置
    overflow: hidden
    
  • display: table-row; border 无效
    父元素添加 display: table; border-collapse: collapse;

测量工具

编辑器

在线编辑

清楚默认样式

Normalize.css

Normalize.css 尽量保留浏览器的默认样式,不进行过多的重置。

normalize.css
html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:0;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}

Reset.css

Reset.css 会尽可能的清除浏览器的默认样式,以此保持各浏览器标签元素的渲染一致性。除此之外,还可参考 YUI [1] 的 CSS Reset 方案。国内曾昙花一现的方案也有 KISSY[2] 内的 CSS Reset 方案。

reset.css
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}

获取 DOM 的 CSS 样式

// 获取样式属性值
const getStyle = (element, attr) => {
  if(element.currentStyle) {
    return element.currentStyle[attr];
  } else {
    return window.getComputedStyle(element, false)[attr];
  }
}
  1. ↑ YUI. CSS Reset[OL]. https://clarle.github.io/yui3/yui/docs/cssreset.
  2. ↑ Alibaba. KISSY CSS Reset的理念[OL]. 2009. http://docs.kissyui.com/1.1.6/cssreset/index.html