60
HTML5 and CSS3 Make your design shine with

New HTML5/CSS3 techniques

Embed Size (px)

DESCRIPTION

New HTML5/CSS3 techniques

Citation preview

Page 1: New HTML5/CSS3 techniques

HTML5 and CSS3

Make your design shine with

Page 2: New HTML5/CSS3 techniques

Beatriz Oliveira

Page 3: New HTML5/CSS3 techniques
Page 4: New HTML5/CSS3 techniques
Page 5: New HTML5/CSS3 techniques
Page 6: New HTML5/CSS3 techniques

HTML5

Page 7: New HTML5/CSS3 techniques

HTML5 Collection of featuresDon’t throw anything

awayEasy to get startedIt already works!It’s here to stay!

Page 8: New HTML5/CSS3 techniques

<!DOCTYPE html>

Page 9: New HTML5/CSS3 techniques

New semantic elementsHTML5 elements

Page 10: New HTML5/CSS3 techniques

<!DOCTYPE html><html lang="en"><head>…</head>

<body> <header> <hgroup>…</hgroup> <nav>…</nav> </header>

<section><article>…</article><article>…</article>

</section>

<footer>…</footer>

</body></html>

Page 11: New HTML5/CSS3 techniques

demo

Page 12: New HTML5/CSS3 techniques

CSS3

Page 13: New HTML5/CSS3 techniques

CSS3 It’s here to stay!Use in non critical areasFocus on experience

levelStart today!

Page 14: New HTML5/CSS3 techniques

multiple background images

CSS3 properties

Page 15: New HTML5/CSS3 techniques

.foo { background:url(image1.png) no-repeat top left,url(image2.png) repeat-x bottom left,url(image3.png) repeat-y top right;

}

Page 16: New HTML5/CSS3 techniques

parallax scrolling

Page 17: New HTML5/CSS3 techniques
Page 18: New HTML5/CSS3 techniques

web fontsCSS3 properties

Page 19: New HTML5/CSS3 techniques

prepare your IIS server for “.otf”web.config

<system.webServer><staticContent>

http://html5boilerplate.com/http://madskristensen.net/post/Prepare-webconfig-for-HTML5-and-CSS3.aspx

Page 20: New HTML5/CSS3 techniques

border-radiusCSS3 properties

Page 21: New HTML5/CSS3 techniques

.foo { border-radius: 10px; }

Page 22: New HTML5/CSS3 techniques

box-shadowCSS3 properties

Page 23: New HTML5/CSS3 techniques

.foo { box-shadow: 1px 1px 2px 2px #999 inset; }

Page 24: New HTML5/CSS3 techniques

opacityCSS3 properties

Page 25: New HTML5/CSS3 techniques

.foo { color: rgba(0, 0, 0, 0.75); }

Page 26: New HTML5/CSS3 techniques

.foo { opacity: 0.5; }

Page 27: New HTML5/CSS3 techniques

vendor-specific prefixesCSS3 properties

Page 28: New HTML5/CSS3 techniques

IE -ms-

Mozilla -moz-

WebKit -webkit-

Opera -o-

Konqueror -khtml-

Page 29: New HTML5/CSS3 techniques

css transformsCSS3 properties

Page 30: New HTML5/CSS3 techniques

what are 2D transforms?

Page 31: New HTML5/CSS3 techniques

“transform" property

Page 32: New HTML5/CSS3 techniques

transform functions

Page 33: New HTML5/CSS3 techniques

.foo { transform: rotate(3deg); }

Page 34: New HTML5/CSS3 techniques

.foo { transform: scaleX(2) scaleY(3); }

Page 35: New HTML5/CSS3 techniques

.foo { transform: scale(2,3); }

Page 36: New HTML5/CSS3 techniques

.foo { transform: skewX(5deg) skewY(-20deg); }

Page 37: New HTML5/CSS3 techniques

.foo { transform: skew(5deg, -20deg); }

Page 38: New HTML5/CSS3 techniques

.foo { transform: translateX(10px) translateY(20px); }

Page 39: New HTML5/CSS3 techniques

.foo { transform: translate(10px, 20px); }

Page 40: New HTML5/CSS3 techniques

“transform-origin" property

Page 41: New HTML5/CSS3 techniques

.foo { transform-origin: left bottom; }

Page 42: New HTML5/CSS3 techniques

css transitionsCSS3 properties

Page 43: New HTML5/CSS3 techniques

smooth property changes

Page 44: New HTML5/CSS3 techniques

.foo {transition-property: background;transition-duration: 0.3s;transition-timimg-function: ease;transition-delay: 0.5s;

}

Page 45: New HTML5/CSS3 techniques

.foo { transition: background 0.3s ease 0.5s; }

Page 46: New HTML5/CSS3 techniques

text-shadowCSS3 properties

Page 47: New HTML5/CSS3 techniques

p { text-shadow: 1px 1px 2px #999; }

Page 48: New HTML5/CSS3 techniques

new selectorsCSS3 selectors

Page 49: New HTML5/CSS3 techniques

.foo:empty

Page 50: New HTML5/CSS3 techniques

.foo:first-child

Page 51: New HTML5/CSS3 techniques

.foo:nth-child(n)

Page 52: New HTML5/CSS3 techniques

.foo:only-child

Page 53: New HTML5/CSS3 techniques

.foo:last-child

Page 54: New HTML5/CSS3 techniques

.foo:target

Page 55: New HTML5/CSS3 techniques

.foo:checked

Page 56: New HTML5/CSS3 techniques

.pre ~ .foo

Page 57: New HTML5/CSS3 techniques

input boxes, css buttons and focus states

CSS3 forms

Page 58: New HTML5/CSS3 techniques
Page 59: New HTML5/CSS3 techniques

Contacts

www.bind.ptTwitter – [email protected]

Page 60: New HTML5/CSS3 techniques

questions?