Your SlideShare is downloading. ×
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Eye Candy Without Images: Fun With CSS3
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Eye Candy Without Images: Fun With CSS3

3,817

Published on

We cover gradients, :before and :after elements, rounded corners, :nth-child, box shadow, and more!

We cover gradients, :before and :after elements, rounded corners, :nth-child, box shadow, and more!

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,817
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. EYE CANDY WITHOUT IMAGES:FUN WITH CSS3 @shoshiroberts
  • 2. WHAT ARE THE BENEFITS?• Faster page-load times• Don’t have to sacrifice usability in older browsers• Spice up layouts• Makes content easier to read (when used well)
  • 3. CSS3: TRAFFIC LIGHTREAL WORLD USES• Status indicators• Buttons• Backgrounds• Page adornment
  • 4. CSS3: TRAFFIC LIGHTHTML<div class="traffic-light"> <span class="stop"></span> <span class="slow"></span> <span class="go"></span></div>Ideally use :before and :after in the CSSinstead of creating dummy html elements.
  • 5. CSS3: TRAFFIC LIGHT REAL WORLD EXAMPLE Uses light color as status indicator.Can be rendered with :after in the CSS.
  • 6. CSS3: TRAFFIC LIGHTCSSdiv.traffic-light span { display: block; margin: 8px 0 0; width: 80px; height: 80px; content:; background-color: #666; /* temporary, will be overwritten */ border-top: 1px solid rgba(255,255,255,0.8); -moz-border-radius: 100px; -webkit-border-radius: 100px; border-radius: 100px; -moz-box-shadow: 0 0 4px rgba(0,0,0,0.8); -webkit-box-shadow: 0 0 4px rgba(0,0,0,0.8); box-shadow: 0 0 4px rgba(0,0,0,0.8); background-image: -webkit-gradient(radial, 50% 0, 100, 50% 0, 0, from(rgba(255,255,255,0)), to(rgba(255,255,255,0.38))); background-image: -moz-radial-gradient(top, ellipse cover, rgba(255,255,255,0.38) 0%, rgba(255,255,255,0) 100%); background-image: -webkit-radial-gradient(top, ellipse cover, rgba(255,255,255,0.38) 0%, rgba(255,255,255,0) 100%); background-image: radial-gradient(top, ellipse cover, rgba(255,255,255,0.38) 0%, rgba(255,255,255,0) 100%);}
  • 7. CSS3: TRAFFIC LIGHTCSS for LIGHT COLORSdiv.traffic-light span.stop { background-color: #D10A11;}div.traffic-light span.slow { background-color: #F6D200;}div.traffic-light span.go { background-color: #43C532;}
  • 8. SMARTER LISTSHTML<h1>Creatures</h1><ul> <li class="special">Unicorn</li> <li>Monster</li> <li>Sparkles</li> <li class="special">Godzilla</li> <li>Nyan Cat</li></ul><p>&#9733; indicates near extinction andsheer awesomeness</p>
  • 9. SMARTER LISTSCSS for ZEBRA STRIPESul { width: 100%; padding: 0; list-style-type: none;}li { padding: 5px 10px; background: #C0C0C0; font-size: 1.2em; text-shadow: 0 1px 0 rgba(255,255,255,0.5);}li:nth-child(2n) { background: #DDD;}
  • 10. SMARTER LISTSCSS for “SPECIAL” STARli.special:after { float: right; content: "2605"; /* Unicode ‘Black Star’ */}
  • 11. WRAPPING IT UP• CSS3 can make your websites pretty (just don’t go overboard)• Faster to load (still pay attention to your render times)• Faster to develop with• Degrade gracefully, and older browsers will play nicely• You can use it right now!
  • 12. link to the demo code THANKS AND HAPPY HACKING!@shoshiroberts for @ladieswhocode

×