64
The Truth Is Out There... CSS3 CSS3

xfiles sharing

Embed Size (px)

DESCRIPTION

Credits: http://lea.verou.me/

Citation preview

Page 1: xfiles sharing

The Truth Is Out There...

C S S 3C S S 3

Page 2: xfiles sharing

Credits ( http://lea.verou.me/ )

Page 3: xfiles sharing
Page 4: xfiles sharing
Page 5: xfiles sharing

Bobby Chen

South AfricaAustralia

Taiwan

Shanghai

Page 6: xfiles sharing
Page 7: xfiles sharing

Name : 陳柏宇 (Bobby)

Job : 盛大創新院

Hobbies : Technology, Movie, Pub, Music etc... Website : caspercby.me

Page 9: xfiles sharing

前端开发?

Page 10: xfiles sharing

UI 设计?

Page 11: xfiles sharing

其他?

Page 12: xfiles sharing

多少人用过 CSS 3 ?

Page 13: xfiles sharing

The Truth Is Out There...

C S S 3C S S 3

Page 14: xfiles sharing

-moz-

-ms--o-

-webkit-

CSS 3 Prefix

http://leaverou.github.com/prefixfree/

Page 15: xfiles sharing

Border RadiusBox shadow

Transparency or RGBA

Columns

Multiple background Outlines

gradients

Rotation

AnimationText-shadow

Page 16: xfiles sharing

Bouncing Transitions

Flexible Ellipse

Multiple OutlinesPass Through Pointer

Tab Size

Sibiling Count

Custum Checkbox & Radio Button

More Cursor

Background Pattern & Positio

n

Page 17: xfiles sharing

CSS Border RadiusDifferent Ways...

Page 18: xfiles sharing

CSS Border RadiusDifferent Ways...

Page 19: xfiles sharing

CSS Border RadiusDifferent Ways...

Page 20: xfiles sharing

CSS Border RadiusDifferent Ways...

Demo

Page 21: xfiles sharing

Internet Explorer

Firefox

Opera

Webkit

Supported

Since IE10

Supported

Supported (in nightly)

Browser Support

ModernCSS Border Radius

Page 22: xfiles sharing

Internet Explorer

Firefox

Opera

Webkit

Browser Support Modern

Version 10 +

Version 7 +

Version 11.5 +

Version 5.1 + (Safari)

Page 23: xfiles sharing

Internet Explorer

Firefox

Opera

Webkit

Supported

Supported

Supported

Browser Support

ModernCSS Border Radius

Supported

Page 24: xfiles sharing

CSS TransitionTransform

Page 25: xfiles sharing

TransformCSS Transition

Demo

Page 26: xfiles sharing

Internet Explorer

Firefox

Opera

Webkit

Supported

Supported

Supported

Browser Support

ModernCSS Border Radius

Supported

Transform

Page 27: xfiles sharing

Bouncing TransitionsElement Positioning

Page 28: xfiles sharing

Bouncing TransitionsElement Positioning

Page 29: xfiles sharing

Bouncing TransitionsElement Positioning

Page 30: xfiles sharing

Bouncing TransitionsElement Positioning

Page 31: xfiles sharing

Bouncing TransitionsElement Positioning

Page 32: xfiles sharing

Bouncing TransitionsElement Positioning

Page 33: xfiles sharing

transition:2s;

Page 34: xfiles sharing

Bouncing TransitionsElement Positioning

GFW

transition:4s;

自由

Page 35: xfiles sharing

Bouncing TransitionsElement Positioning

GFW

transition:4s;

自由

transition: all 4s ease-in-out;transition-timing-function:cubic-bezier(0,1,1,0);

cubic-bezier

Page 36: xfiles sharing

Bouncing TransitionsElement Positioning

http://cubic-bezier.com

Demo

Page 37: xfiles sharing

Bouncing Transitions

Internet Explorer

Firefox

Opera

Webkit

Supported

Since IE10

Supported

Supported (in nightly)

cubic-bezier

Browser Support

Modern

Page 38: xfiles sharing

Multiple OutlinesBox-Shadow Spread

Page 39: xfiles sharing

LOOK HEREo(O.O)o

LOOK HEREo(O.O)o

Multiple OutlinesBox-Shadow Spread

box-shadow: 0 0 5px white;

Page 40: xfiles sharing

LOOK HEREo(O.O)o

Multiple OutlinesBox-Shadow Spread

LOOK HEREo(O.O)o

Demo

Page 41: xfiles sharing

LOOK HEREo(O.O)o

Multiple OutlinesBox-Shadow Spread

LOOK HEREo(O.O)o

box-shadow: 0 0 0 5px black, 0 0 0 10px gold, 0 0 0 20px black, 0 0 0 35px white;

Page 42: xfiles sharing

Internet Explorer

Firefox

Opera

Webkit

Supported

Supported

Multiple OutlinesMultiple Outline Effect

Supported

Supported

Browser Support

Modern

Page 43: xfiles sharing

Click Through ObjectPointer-Events

Page 44: xfiles sharing

Cyril

Page 45: xfiles sharing

Click Through ObjectPointer-Events

Tag Cloud

http://demos.hacks.mozilla.org/openweb/pointer-events/

Page 46: xfiles sharing

background: -moz-linear-gradient(right center , #002233 40px, rgba(0, 34, 51, 0)) repeat scroll 0 0 transparent;

Click Through ObjectPointer-Events

Tag Cloud

pointer-events:none;

http://demos.hacks.mozilla.org/openweb/pointer-events/

Page 47: xfiles sharing

Click Through ObjectPointer-EventsDemo

http://demos.hacks.mozilla.org/openweb/pointer-events/

pointer-events:none;

Page 48: xfiles sharing

Internet Explorer

Firefox

Opera

Webkit

Click Through ObjectPointer-Events

Supported

Supported, Since 3.6

Not Supported

Not Supported

Page 49: xfiles sharing

Click Through ObjectPointer-Events

function noPointerEvents (element) { $(element).bind('click mouseover', function (evt) { this.style.display = 'none'; var x = evt.pageX, y = evt.pageY, under = document.elementFromPoint(x, y); this.style.display = ''; evt.stopPropagation(); evt.preventDefault(); $(under).trigger(evt.type); });}

Pointer-EventsJavascript Workaround

Page 51: xfiles sharing
Page 52: xfiles sharing

Custom Input DesignFancy Checkbox / Radio

Page 53: xfiles sharing

Custom Input DesignFancy Checkbox / Radio

css => :checked

Page 54: xfiles sharing

Internet Explorer

Firefox

Opera

Webkit

Supported

Supported

Supported

Supported

Custom Input Designcss=> :checked

Browser Support

Modern

Page 55: xfiles sharing

Sequential StylingSibling Count

Page 56: xfiles sharing

Sequential StylingSibling Count

css => :last-child:last-child

Page 57: xfiles sharing

Sequential StylingSibling Count

css => :nth-child:nth-child(2n+1)

Page 58: xfiles sharing

Sequential StylingSibling Count

css => :nth-child:nth-child(3n+1)

Page 59: xfiles sharing

Sequential StylingSibling Count

Page 60: xfiles sharing

Sequential Styling

Internet Explorer

Firefox

Opera

Webkit

Supported

Supported

Supported

Supported

Browser Support

Moderncss => selectors

Page 61: xfiles sharing

Background PatternsWith Pure CSS

Page 62: xfiles sharing

Background PatternsWith Pure CSS

Linear-Gradient

http://leaverou.me/css3patterns/#

Page 63: xfiles sharing

Background PatternsLinear-Gradient

Internet Explorer

Firefox

Opera

Webkit

Supported

Supported (Radial gradients in v12)

Supported since IE10

Supported (Safari since 5.1)

Browser Support

Modern