• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Eye Candy Without Images: Fun With CSS3
 

Eye Candy Without Images: Fun With CSS3

on

  • 3,981 views

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!

Statistics

Views

Total Views
3,981
Views on SlideShare
3,976
Embed Views
5

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 5

https://www.linkedin.com 3
http://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Eye Candy Without Images: Fun With CSS3 Eye Candy Without Images: Fun With CSS3 Presentation Transcript

    • EYE CANDY WITHOUT IMAGES:FUN WITH CSS3 @shoshiroberts
    • 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)
    • CSS3: TRAFFIC LIGHTREAL WORLD USES• Status indicators• Buttons• Backgrounds• Page adornment
    • 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.
    • CSS3: TRAFFIC LIGHT REAL WORLD EXAMPLE Uses light color as status indicator.Can be rendered with :after in the CSS.
    • 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%);}
    • 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;}
    • 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>
    • 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;}
    • SMARTER LISTSCSS for “SPECIAL” STARli.special:after { float: right; content: "2605"; /* Unicode ‘Black Star’ */}
    • 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!
    • link to the demo code THANKS AND HAPPY HACKING!@shoshiroberts for @ladieswhocode