- Chrome 1
- Safari 1.2
- Firefox 0.9
- Opera 9
- IE 4* / IE 9
opacity: 1;
opacity: 0.75;
opacity: 0.5;
opacity: 0.25;
opacity: 0;
Estelle Weyl · Standardista.com · @estellevw ·Press → key to advance. ·Press 2 for notes.
opacity: 1;
opacity: 0.75;
opacity: 0.5;
opacity: 0.25;
opacity: 0;
color: rgba(0, 0, 0, 1);
background-color: rgba(58, 103, 171, 1);
color: rgba(0, 0, 0, 0.75);
background-color: rgba(58, 103, 171, 0.75);
color: rgba(0, 0, 0, 0.5;
background-color: rgba(58, 103, 171, 0.5);
color: rgba(0, 0, 0, 0.25);
background-color: rgba(58, 103, 171, 0.25);
color: rgba(0, 0, 0, 0)
background-color: rgba(58, 103, 171, 0);
color:hsla( 328, Hblah100%, S 44%, L 1.00 A );
rgba(58, 103, 171, 0.5); hsla(216, 49%, 45%, 0.5);
.trans { box-shadow: -10px 10px rgba(0,0,0,0.3); text-shadow: 0 21px 1px rgba(0,0,0,0.3);}
.solid { box-shadow: -10px 10px #999; text-shadow: 0 21px 1px #999;}
Border on slides, code & showflakes
border-radius: 0;
border-radius: 20px;
border-radius: 50%;
% works correctly since Safari 5.1 and FF 4.0
.circle {border-radius: 50%;}
.oval { border-radius: 50%;}
.different { border-radius: 10px 30px;}
.elliptical { border-radius: 10px / 30px;}
box-shadow: (inset) left top blur spread color; text-shadow: left top blur spread color;
.trans { box-shadow: -10px 10px rgba(0,0,0,0.3); text-shadow: 0 21px 1px rgba(0,0,0,0.3);}
.solid { box-shadow: -10px 10px #999; text-shadow: 0 21px 1px #999;}
.textshadow { text-shadow: 0 1px #cccccc, 0 2px #c9c9c9, 0 3px #bbbbbb, 0 4px #b9b9b9, 0 5px #aaaaaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.2), 0 20px 20px rgba(0, 0, 0, 0.15); }
Syntax
text-shadow: 0 2px 5px hsla(0, 0%, 0%, 0.2); text-shadow: [horiz] [vert] [blur] [color];
box-shadow: inset 3px -3px 0 3px green, inset -3px 3px 0 3px yellow, 3px 3px 0 3px blue, -3px -3px 0 3px magenta; box-shadow: inset? [horiz] [vert] [blur] [spread] [color];
@font-face { font-family: 'ChalkdusterRegular'; src: url('chalkduster-webfont.eot'); src: url('chalkduster-webfont.eot?#iefix') format('embedded-opentype'), url('chalkduster-webfont.woff') format('woff'), url('chalkduster-webfont.ttf') format('truetype'), url('chalkduster-webfont.svg#ChalkdusterRegular') format('svg'); font-weight: normal; font-style: normal; }
body { font-family: 'ChalkdusterRegular'; }
@font-face { font-family: yourFontName; src: url(fontfile) [, url(fontfile)]*; [font-weight: bold|normal]; [font-style: italic|normal]; [charset: characterSet;] }
File | Chrome | Firefox | Opera | Safari | Internet Explorer |
---|---|---|---|---|---|
EOT | Χ | Χ | Χ | Χ | ✓ |
TTF/OTF | ✓ | ✓ (3.5+) | ✓ (10+) | ✓ (iOS 4.2) | (9) |
SVG | ✓ | Χ | ✓ | ✓ | |
WOFF | ✓ (5+) | ✓ (3.6+) | ✓ (11.1+) | ✓ (5.1) | ✓ (9) |
column-count: 1; column-width: 10em; column-rule: 1px solid #bbb; column-gap: 2em;
Adipisicing rump nostrud exercitation turkey, bresaola deserunt ullamco beef ribs pork loin ball tip pig pork belly nisi. Cillum sunt officia deserunt, beef aliqua ham ut t-bone sed ut consequat shoulder. Nostrud excepteur biltong non, fatback salami incididunt beef cupidatat occaecat.
Reprehenderit ham hock labore tri-tip chuck, excepteur ut. Meatball sint enim beef ribs, mollit laborum flank commodo fatback pariatur tail rump eiusmod spare ribs dolore. Ut minim qui, tongue eu short ribs pancetta excepteur incididunt culpa consequat pastrami magna chuck. Flank sunt sint, occaecat ut adipisicing labore turkey laboris in magna.
Chicken bacon meatloaf minim meatball salami sunt spare ribs.
Bacon sed tail, pork loin pariatur meatloaf hamburger exercitation corned beef shank ex esse sirloin qui beef ribs. Consectetur anim corned beef, cupidatat ex enim tempor. Pariatur consectetur ad, enim ut quis consequat aliquip exercitation jowl tenderloin ham dolore.
Fugiat excepteur aliqua, cow dolor swine shoulder elit tri-tip shankle. Irure consectetur cow labore, cupidatat exercitation ea jerky ham officia dolore tongue eu aliqua. Ham hock irure beef ribs non, flank sausage eiusmod ham short loin nostrud.
box-sizing: content-box | border-box
div { width: 200px; height:100px; padding: 20px; margin:20px; border-width: 5px; }
border-box replicates the old IE box model
Used to position horizontal and vertical stacks.
.box { display: box; box-orient:; } .box .one, .box .two { box-flex: 1; } .box .three { box-flex: 3; }
.box { display: box; box-pack: ; box-align: ; }
display: box ;
box-orient: horizontal | vertical | inherit;
box-pack: start | end | center | justify;
box-align: start | end | center | baseline | stretch;
box-flex: integer | 0;
box-flex-group
box-ordinal-group
box-direction: normal | reverse | inherit;
box-lines:
display: flexbox | inline-flexbox;
flex-direction: lr | rl | tb | bt | inline | inline-reverse | block | block-reverse flex-order: integer | 1; flex-pack: start | end | center | justify; flex-align: auto | baseline;
The spec syntax changed drastically. Chrome is currently changing over. Other browsers have it on their plans.
Using grid system to lay out content, dividing available space into columns and rows
grid-columns: grid-rows: grid-column: grid-row: grid-cell: grid-cell-stacking: grid-template: grid-column-span: grid-row-span: grid-column-sizing: grid-row-sizing: grig-flow: grid-column-align: grid-row-align: grid-layer:
display: grid | inline-grid
Avoid ‘background’ because it resets everything!
background-color: transparent; background-image: none; background-position: 0 0; background-size: auto; background-repeat: repeat; background-clip: border-box; background-origin: padding-box; background-attachment: scroll;
Can now set 4-value position!
background-position: bottom 20px right 20px;
background-size: auto | contain | cover | <length>
background-clip: border-box | padding-box | content-box
background-origin: border-box | padding-box | content-box
background: img position / size repeat attachment origin clip, img position / size repeat attachment box{1,2} bgcolor;
background: url(topImg.jpg) 0 0 / 30px 30px repeat scroll border-box content-box, url(botImg.jpg) 15px 15px / 30px 30px fixed border-box #609;
If one ‘box’ value is present then it sets both 'background-origin' and 'background-clip' to that value. If two values are present, then the first sets 'background-origin' and the second 'background-clip'
border-image: source || slice / width / outset || repeat;
border-image-source: none | url() | <image> border-image-slice: <number> | XX% {1,4} && fill border-image-width: <length> | XX% | <number> | 1 | auto {1,4} border-image-outset: <length> | <number> {1,4} border-image-repeat: stretch | repeat | round {1,2}
S = W =
border-image: url(gradient.png) 34 / 34px stretch;
p { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
overflow-hidden only: Play with the slider to see what happens at the end of the line
white-space: nowrap, overflow: hidden: Play with the slider to see what happens at the end of the line
text-overflow: ellipsis; white-space: nowrap; and overflow: hidden: Play with the slider to see what happens at the end of the line
Needs nowrap and overflow:hidden (anything other than visible) to work.
Prefixed in Opera 9 and Opera 10.
word-wrap: normal | break-word
.colA { width:50%; margin-right: 1em; } .colB { width: -moz-calc(50% - 1em); }
html { font-size: 62.5%; } p { font-size: 13px; font-size: 1.3rem; } small { font-size: 11px; font-size: 1.1rem; }