SlideShare a Scribd company logo
1 of 116
Making Links Magical Again with CSS

                      Re:build 2012
                      @jennlukas
http://owltastic.com/
/   Link Transition (all/color)
l   a {
    !   text-decoration: none;
    !   color: #5e9092;
    !   -webkit-transition: all 0.2s linear;
    !   -moz-transition: all 0.2s linear;
    !   -o-transition: all 0.2s linear;
    !   transition: all 0.2s linear;
    }

    a:hover {
    !   color: #96c0c2;
    }
http://2012.dconstruct.org/
http://2012.dconstruct.org/
/ Transition (all: BACKGROUND, COLOR,PADDING)
l   .speakers-list li span { background-color:#222; background:rgba(0,0,0,0.8); color:
    rgba(255,255,255,0.7); text-transform: uppercase;font-size: 0.7em; position:
    absolute; right: 0; left: 0; bottom: 0; padding: 5px 10px;
    !   -webkit-transition: all 0.3s ease-out;
    !   -moz-transition: all 0.3s ease-out;
    !   -ms-transition: all 0.3s ease-out;
    !   -o-transition: all 0.3s ease-out;
    !   transition: all 0.3s ease-out;
    }

    .speakers-list li a:hover span { background: rgba(255,255,255, 0.8); color: #111;
    padding-bottom: 20px; }
Don’t stallone It
O Music Awards 2
http://cog.gd/43y
http://jsfiddle.net/Jenn/WG3NE/
http://jsfiddle.net/Jenn/WG3NE/
/   List Item( HTML)
l   <li>
    !    <a href="#">
    !    !    <div class="grid-info">
    !    !    !   <h2><span>Must Follow</span><br /><span>Artist on Twitter</span></h2>
    !    !    !   <div class="grid-reveal">
    !    !    !   !    <p>For those of you with more than three tattoos of the same band, we
    salute you.</p>
    !    !    !   !    <p class="grid-sponsor">Sponsored by <img src="http://placekitten.com/
    80/20" width="80" height="20" alt="Loreal Paris" /></p>
    !    !    !   </div>
    !    !    </div>
    !    </a>
    </li>
/   List Item(CSS)
l   li { width: 333px; height: 278px; position: relative; }

    a { display: block; width: 100%; height: 100%; background: #9cf; text-decoration:
    none; }

    .grid-info { position: absolute; bottom: 0; }

    .grid-reveal { overflow: hidden; max-height: 0; background: #c0b3b3;
        -webkit-transition: all 0.7s linear;
    }
                                        
    a:hover .grid-reveal, a:focus .grid-reveal { max-height: 250px; }
http://omusicawards.com/vote
/   Vote Divs (HTML)
l   <div class="block-paper grid-item">
    !   <a href="#">
    !   !    <h3><span>Vote Now!</span> <strong>Category Title</strong></h3>
    !   !    <p class="grid-desc">They pledge rapid allegiance to the band.</p>! !
    !   !    <span class="frame"><img src="http://placehold.it/265x265" alt="" /></span>
    !   !    <p class="vote-count count-hot"><strong>5,000</strong> votes per hour</p>
    !   </a>!
    </div>
/   Vote Hovers (CSS)
l   a:hover, a:focus { text-decoration: none; color: #231f20; }
    a:hover strong, a:focus strong { background: #a2e5d2; }
    a:hover p.grid-desc, a:focus p.grid-desc { max-height: 300px; margin-bottom: 12px; }
    a:hover h3 span, a:focus h3 span { max-height: 100px; }
    a:hover .vote-count, a:focus .vote-count { max-height: 0; margin: 0; padding: 0; }
http://omusicawards.com/vote
http://galleryofmo.co.uk/
http://galleryofmo.co.uk/
http://galleryofmo.co.uk/
/   Navigation and badge hovers
l   section#header ul li.count a { position:absolute; top:40px; right:640px; color:#282828;
        -webkit-transition: all 0.5s ease;
        -moz-transition: all 0.5s ease;
        -o-transition: all 0.5s ease;
        transition: all 0.5s ease;
    }

    section#header ul li.count a:hover { color:#6ebeb7; top:30px; }

    a.site:hover { top:110px; }
http://itsnumbered.com/
http://itsnumbered.com/
http://itsnumbered.com/
http://itsnumbered.com/
/   Product HTML
l   #featured-products_block_center li div.under {
    !   bottom: 0;
    !   position: absolute;
    !   height: 5px;
    !   background: #fff;
    !   border-top: 20px #F0F1EC solid;
    !   left: 0;
    }

    #featured-products_block_center li:hover div.under {
    !   background: #d34132;
    }
http://codepen.io/Jenn/pen/ztHvx
/   Product link css
l   a { color: #333; text-decoration: none; text-transform: uppercase; font: bold 12px
    arial; display: block; position: relative; padding: 10px; }

    a:after { content: ''; height: 5px; width: 100%; position: absolute; bottom:
    -20px; left: 0; background: #fff; }

    a:hover h2 { color: red; }
    a:hover:after { background: red; }
http://codepen.io/Jenn/pen/ztHvx
http://codepen.io/Jenn/pen/ztHvx
http://coworkchicago.com/
http://coworkchicago.com/
/   Link Transition (height, Margin)
l   join-buttons .daily, .join-buttons .monthly { height: 260px; z-index: 0; margin-top:
    30px;
    !   transition: height .2s linear,margin .2s linear;
    !   -o-transition: height .2s linear,margin .2s linear;
    !   -moz-transition: height .2s linear,margin .2s linear;
    !   -webkit-transition: height .2s linear,margin .2s linear;
    }

    .join-buttons .daily:hover, .join-buttons .monthly:hover { height: 280px; margin-top:
    20px; }

    li.button:hover { z-index: 20; }
http://coworkchicago.com/
/   Hover rotation
l   .peepcard { width: 125px; height: 189px; float: left; position: relative;
    !   -webkit-transition: -webkit-transform .2s ease-out;
    !   -moz-transition: -moz-transform .2s ease-out;
    !   -o-transition: -o-transform .2s ease-out;
    }

    .feat4 { top:13px; left:2px;
    !   -webkit-transform:rotate(-3deg);
    !   -moz-transform:rotate(-3deg);
    !   -ms-transform:rotate(-3deg);
    !   -o-transform:rotate(-3deg)
    }

    .feat4:hover {
    !   -webkit-transform:rotate(-2deg);
    !   -moz-transform:rotate(-2deg);
    !   -ms-transform:rotate(-2deg);
    !   -o-transform:rotate(-2deg)
    }
http://www.rdio.com/
http://www.rdio.com/
http://www.rdio.com/
http://www.rdio.com/
/   layering opacity effects
l   .Index .stripe#heroes .arrow.up { background-position: top left; left: 0; }
    .Index .stripe#heroes .arrow.down { background-position: top right; right: 0; }

    .Index .stripe#heroes .arrow { background-image: url(/media/marketing/images/heroes/
    arrows.png); cursor: pointer; height: 460px; opacity: 0; position: absolute; width:
    190px; z-index: 201;
    !   -webkit-transition: opacity 0.25s;
    !   -moz-transition: opacity 0.25s;
    !   -ms-transition: opacity 0.25s;
    !   -o-transition: opacity 0.25s;
    !   transition: opacity 0.25s;
    }

    .Index .stripe#heroes:hover .arrow.bottom { opacity: 1; }
    .Index .stripe#heroes .arrow.top:hover { opacity: 1; }
http://funnelbox.com
/   Div mask & width transitions
l   .marquee .ctaMask {! position:absolute; top:360px; overflow:hidden; width: 51px;
    !   transition: width 0.5s ease-out;
    !   -moz-transition: width 0.5s ease-out;
    !   -webkit-transition: width 0.5s ease-out;
    }

    .marqueeWrap.interactive:hover .ctaMask { width:550px; }

    .marquee .ctaLinks span.link, .marquee .ctaLinks span.arrow.secondary { opacity:0;
    filter:alpha(opacity=0);
    !   transition: opacity 0.5s ease-in-out;
    !   -moz-transition: opacity 0.5s ease-in-out;
    !   -webkit-transition: opacity 0.5s ease-in-out;
    }

    .marqueeWrap.interactive:hover .ctaLinks span.arrow.secondary {
    !   opacity:1;
    !   filter:alpha(opacity=100);
    }
http://www.emporiumpies.com/pies
http://www.emporiumpies.com/pies
css-tricks.com/almanac/properties/b/backface-visibility/
Experiments!!
http://mammothbooth.com/#/faq.html
http://mammothbooth.com/#/faq.html
http://codepen.io/Jenn/pen/qsklF
/   Sliding Box (HTML)
l   <div>
      <h2>How Much Does It cost?</h2>
      <img src="http://placekitten.com/100/50" />
      <p>One morning, when Gregor Samsa woke from troubled dreams, he found himself
    transformed in his bed into a horrible vermin. He lay on his armour-like back, and if
    he lifted his head a little he could see his brown belly, slightly domed and divided by
    arches into stiff sections. </p>
    </div>
/   Sliding Box (CSS)
l   div { background: #f90; width: 500px; padding: 20px;   position: relative;
    overflow: hidden;      }

    h2 {position: absolute; left: 10px; top: 0px; transition: top
    0.2s linear; }

        position: absolute; right: 20px; bottom: 15px; transition:
    img {
    bottom 0.2s linear; }

    p {    opacity: 0; transition: opacity 0.5s linear;            }
http://codepen.io/Jenn/pen/qsklF
/   Sliding Box HOvers(CSS)
l   div:hover {
      p {!
        ! opacity: 1;
      }
      img {
         bottom: -100px;
      }
      h2 {
         top: -100px;
      }
    }
http://circlesconference.com/
http://circlesconference.com/
http://codepen.io/Jenn/full/grjcd
http://codepen.io/Jenn/pen/grjcd
http://codepen.io/Jenn/pen/grjcd
http://codepen.io/Jenn/pen/grjcd
http://codepen.io/Jenn/pen/grjcd
/   CSS Filters (grayscale)
l   img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter:
    grayscale(100%); }
http://codepen.io/Jenn/pen/grjcd
/   CSS Filters (sepia)
l   img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter:
    grayscale(100%) sepia(90%); }
http://codepen.io/Jenn/pen/grjcd
/   CSS Filters (hue-rotate)
l   img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter:
    grayscale(100%) sepia(90%) hue-rotate(90deg); }
http://codepen.io/Jenn/pen/grjcd
/   CSS Filters (contrast)
l   img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter:
    grayscale(100%) sepia(90%) hue-rotate(90deg) contrast(110%); }
http://codepen.io/Jenn/pen/grjcd
/   CSS Filters: Hover
l   img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter:
    grayscale(100%) sepia(90%) hue-rotate(90deg) contrast(110%); -webkit-transition: all
    0.5s linear; }

    a:hover, a:focus {
       img {
      ! !     -webkit-filter: grayscale(70%) sepia(100%) hue-rotate(0deg) contrast(110%);
       }
       span {
         color: #fff;
       }
    }
http://codepen.io/Jenn/full/grjcd
http://www.readability.com/
http://cog.gd/4hk
http://thenerdary.net/
http://codepen.io/Jenn/full/gCKex
http://codepen.io/Jenn/full/gCKex
/   CSS Filters: Invert
l   body { background: #818291; font-family: arial; }

    .wrap { width: 600px; margin: 20px auto; padding: 20px; background: #fff; }
    h1 { text-transform: uppercase; margin: 0 0 20px; }
    p { margin-bottom: 20px; }

    .code-block     { border: 5px solid #1d1f1d; background: #fff; font-family:
    monospace; box-shadow: 2px 2px 5px rgba(0,0,0,0.9);}
    .code-block:hover { -webkit-filter: invert(1); }
    .code-block ::selection { background: #3639d9; color: #fff; }
http://codepen.io/Jenn/full/HKoAl
http://codepen.io/Jenn/full/HKoAl
/   CSS Filters: Invert (The Nerdary)
l   pre {
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    background: #484742;
    border-radius: 5px;
    color: white;
    font-size: 10pt;
    font-size: 1rem;
    padding: 15px;
    max-width: 580px;
    overflow: auto;
    }

    pre:hover { -webkit-filter: invert(1); }
http://codepen.io/Jenn/full/eFcux
http://codepen.io/Jenn/full/eFcux
/   CSS Filters: Blur
l   article { padding: 20px; border-bottom: 5px solid #333; background: #fff; color: #222;
    position: relative;   -webkit-filter: blur(2px);       }
http://codepen.io/Jenn/full/eFcux
/   CSS Filters: Blur
l   article { padding: 20px; border-bottom: 5px solid #333; background: #fff; color: #222;
    position: relative; -webkit-filter: blur(2px); }

    article:hover { -webkit-filter: blur(0px); }
http://codepen.io/Jenn/full/eFcux
http://codepen.io/Jenn/full/eFcux
/   CSS Filters: Blur, Invert
l   article { padding: 20px; border-bottom: 5px solid #333; background: #fff; color: #222;
    position: relative; -webkit-filter: blur(2px); }

    article:hover { -webkit-filter: blur(0px); }
    article:focus { -webkit-filter: blur(0px)           invert(1);    }
http://codepen.io/Jenn/full/eFcux
/   CSS Generated Messages
l   article { padding: 20px; border-bottom: 5px solid #333; background: #fff; color: #222;
    position: relative; -webkit-filter: blur(2px); }

    article:hover { -webkit-filter: blur(0px); }
    article:focus { -webkit-filter: blur(0px) invert(1); }

    article:hover:before { content: 'Click on/off to invert';
    position: absolute; right: 5px; top: 5px; background: #000;
    color: #fff; padding: 5px; font: bold 12px Arial; text-transform:
    uppercase; }
http://codepen.io/Jenn/full/eFcux
http://codepen.io/Jenn/full/eFcux
http://cog.gd/44c
http://cog.gd/44c
http://cog.gd/44d
http://cog.gd/44d
/   Burt vs Tom HTML
l   <header class="wrap">
    !   <h1>Tom Selleck or Burt Reynolds?!?</h1>
    !   <p class="adjunct"><strong class="left">Tom Selleck</strong> <strong
    class="right">Burt Reynolds</strong></p>
    </header>

    <div role="main" class="wrap">
    !   <div class="tom"><span><img src="i/1.jpeg" alt="1" width="" height="" /></span>
    <strong>It's Tom!!</strong></div>
    !   <div class="burt"><span><img src="i/3.jpeg" alt="1" width="" height="" /></span>
    <strong>Burt here!!</strong></div>
    !   <div class="tom"><span><img src="i/4.jpeg" alt="1" width="" height="" /></span>
    <strong>Tom strikes again!!</strong></div>
    !   <div class="burt"><span><img src="i/5.jpeg" alt="1" width="" height="" /></span>
    <strong>Burt is the word!!</strong></div>
    </div>
/   Burt vs Tom CSS
l   div { width: 100%; position: relative; min-height: 95px; margin: 0 0 5px; }

    span { position: absolute; display: block; padding: 10px 0 5px; width: 100px; text-
    align: center; -webkit-transition: all 0.35s ease-in-out 0.5s; }

    .tom span { left: 330px; }
    .burt span { right: 330px; }
    .tom:hover span { left: 0; }
    .burt:hover span { right: 0; }

    img { display: inline-block; }

    div strong { display: block; padding: 15px 0 0 110px; opacity: 0; -webkit-transition:
    opacity 0.35s ease-in-out 0.6s; }
    div.burt strong { padding: 15px 110px 0 0; text-align: right; }

    div:hover > strong { opacity: 1; }
This cat totally loves hovers.
Making Links Magical Again with CSS
Making Links Magical Again with CSS

More Related Content

What's hot

جيفيرا باي الساحل الشمالي
جيفيرا باي الساحل الشماليجيفيرا باي الساحل الشمالي
جيفيرا باي الساحل الشماليReda Hassan
 
Joomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
Joomla!Day 2013 Nürnberg; Vortrag von Johannes HockJoomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
Joomla!Day 2013 Nürnberg; Vortrag von Johannes HockadhocgraFX
 
Flickr Open Api Mashup
Flickr Open Api MashupFlickr Open Api Mashup
Flickr Open Api MashupJinho Jung
 
Yeni metin belgesi (2)
Yeni metin belgesi (2)Yeni metin belgesi (2)
Yeni metin belgesi (2)makarnalar
 
Try Web Components
Try Web ComponentsTry Web Components
Try Web Components拓樹 谷
 
Bloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.noBloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.noHannee92
 
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventHTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventRobert Nyman
 
Fansihttp://www.ricepullers.in/FANSI
Fansihttp://www.ricepullers.in/FANSIFansihttp://www.ricepullers.in/FANSI
Fansihttp://www.ricepullers.in/FANSINarendra Modig
 
Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2cori0506
 
Date difference[1]
Date difference[1]Date difference[1]
Date difference[1]shafiullas
 
Branding your school district
Branding your school districtBranding your school district
Branding your school districttrexler
 
HTML5 Boilerplate - PV219
HTML5 Boilerplate - PV219HTML5 Boilerplate - PV219
HTML5 Boilerplate - PV219GrezCZ
 
Você precisa aprender Web
Você precisa aprender WebVocê precisa aprender Web
Você precisa aprender WebJean Carlo Emer
 

What's hot (18)

جيفيرا باي الساحل الشمالي
جيفيرا باي الساحل الشماليجيفيرا باي الساحل الشمالي
جيفيرا باي الساحل الشمالي
 
This is a test
This is a testThis is a test
This is a test
 
Joomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
Joomla!Day 2013 Nürnberg; Vortrag von Johannes HockJoomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
Joomla!Day 2013 Nürnberg; Vortrag von Johannes Hock
 
Flickr Open Api Mashup
Flickr Open Api MashupFlickr Open Api Mashup
Flickr Open Api Mashup
 
Yeni metin belgesi (2)
Yeni metin belgesi (2)Yeni metin belgesi (2)
Yeni metin belgesi (2)
 
Ocul emergency-presentation
Ocul emergency-presentationOcul emergency-presentation
Ocul emergency-presentation
 
Try Web Components
Try Web ComponentsTry Web Components
Try Web Components
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Bloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.noBloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.no
 
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile EventHTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
HTML5 and CSS3: Exploring Mobile Possibilities - London Ajax Mobile Event
 
Fansihttp://www.ricepullers.in/FANSI
Fansihttp://www.ricepullers.in/FANSIFansihttp://www.ricepullers.in/FANSI
Fansihttp://www.ricepullers.in/FANSI
 
Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2
 
Date difference[1]
Date difference[1]Date difference[1]
Date difference[1]
 
Branding your school district
Branding your school districtBranding your school district
Branding your school district
 
HTML5 Boilerplate - PV219
HTML5 Boilerplate - PV219HTML5 Boilerplate - PV219
HTML5 Boilerplate - PV219
 
Você precisa aprender Web
Você precisa aprender WebVocê precisa aprender Web
Você precisa aprender Web
 
Nananana
NanananaNananana
Nananana
 
Sami direct presentation
Sami direct presentationSami direct presentation
Sami direct presentation
 

Viewers also liked

A Guide to Being a Better Coworker
A Guide to Being a Better Coworker A Guide to Being a Better Coworker
A Guide to Being a Better Coworker Jenn Lukas
 
Cure for the Common Code
Cure for the Common CodeCure for the Common Code
Cure for the Common CodeJenn Lukas
 
JavaScript and Web Standards - The Subliminal Messaging edition
JavaScript and Web Standards - The Subliminal Messaging editionJavaScript and Web Standards - The Subliminal Messaging edition
JavaScript and Web Standards - The Subliminal Messaging editionJenn Lukas
 
JavaScript and Web Standards 2: The Quickening
JavaScript and Web Standards 2: The QuickeningJavaScript and Web Standards 2: The Quickening
JavaScript and Web Standards 2: The QuickeningJenn Lukas
 
SmashingConf Whister: Developers Ampersandwich
SmashingConf Whister: Developers AmpersandwichSmashingConf Whister: Developers Ampersandwich
SmashingConf Whister: Developers AmpersandwichJenn Lukas
 
JavaScript and Web Standards Sitting in a Tree
JavaScript and Web Standards Sitting in a TreeJavaScript and Web Standards Sitting in a Tree
JavaScript and Web Standards Sitting in a TreeJenn Lukas
 

Viewers also liked (7)

A Guide to Being a Better Coworker
A Guide to Being a Better Coworker A Guide to Being a Better Coworker
A Guide to Being a Better Coworker
 
Hot Links
Hot LinksHot Links
Hot Links
 
Cure for the Common Code
Cure for the Common CodeCure for the Common Code
Cure for the Common Code
 
JavaScript and Web Standards - The Subliminal Messaging edition
JavaScript and Web Standards - The Subliminal Messaging editionJavaScript and Web Standards - The Subliminal Messaging edition
JavaScript and Web Standards - The Subliminal Messaging edition
 
JavaScript and Web Standards 2: The Quickening
JavaScript and Web Standards 2: The QuickeningJavaScript and Web Standards 2: The Quickening
JavaScript and Web Standards 2: The Quickening
 
SmashingConf Whister: Developers Ampersandwich
SmashingConf Whister: Developers AmpersandwichSmashingConf Whister: Developers Ampersandwich
SmashingConf Whister: Developers Ampersandwich
 
JavaScript and Web Standards Sitting in a Tree
JavaScript and Web Standards Sitting in a TreeJavaScript and Web Standards Sitting in a Tree
JavaScript and Web Standards Sitting in a Tree
 

Similar to Making Links Magical Again with CSS

HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventRobert Nyman
 
Learn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandLearn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandThemePartner
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichRobert Nyman
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]ThemePartner
 
My discussion Student A A8 - Cross-Site Request Forgery (CSR.docx
My discussion Student A A8 - Cross-Site Request Forgery (CSR.docxMy discussion Student A A8 - Cross-Site Request Forgery (CSR.docx
My discussion Student A A8 - Cross-Site Request Forgery (CSR.docxgilpinleeanna
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopShoshi Roberts
 
PreDevCampSF - CSS3 Tricks
PreDevCampSF - CSS3 TricksPreDevCampSF - CSS3 Tricks
PreDevCampSF - CSS3 Tricksincidentist
 
Doctype html publi
Doctype html publiDoctype html publi
Doctype html publiEddy_TKJ
 
cssstyle.cssbody { font-family Montserrat, Arial, sa
cssstyle.cssbody {    font-family Montserrat, Arial, sacssstyle.cssbody {    font-family Montserrat, Arial, sa
cssstyle.cssbody { font-family Montserrat, Arial, saMargenePurnell14
 
Presentation html5 css3 by thibaut
Presentation html5 css3 by thibautPresentation html5 css3 by thibaut
Presentation html5 css3 by thibautThibaut Baillet
 
Responsive Design Tools & Resources
Responsive Design Tools & ResourcesResponsive Design Tools & Resources
Responsive Design Tools & ResourcesClarissa Peterson
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsKaelig Deloumeau-Prigent
 

Similar to Making Links Magical Again with CSS (20)

popular posts widget
popular posts widgetpopular posts widget
popular posts widget
 
Theme 23
Theme 23Theme 23
Theme 23
 
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
 
Learn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandLearn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day Deutschland
 
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference ZürichHTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
HTML5 and CSS3 – exploring mobile possibilities - Frontend Conference Zürich
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
 
Theme02
Theme02Theme02
Theme02
 
Css 2
Css 2Css 2
Css 2
 
Css
CssCss
Css
 
My discussion Student A A8 - Cross-Site Request Forgery (CSR.docx
My discussion Student A A8 - Cross-Site Request Forgery (CSR.docxMy discussion Student A A8 - Cross-Site Request Forgery (CSR.docx
My discussion Student A A8 - Cross-Site Request Forgery (CSR.docx
 
HTML5 y CSS3
HTML5 y CSS3HTML5 y CSS3
HTML5 y CSS3
 
Css 3
Css 3Css 3
Css 3
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
 
Theme03
Theme03Theme03
Theme03
 
PreDevCampSF - CSS3 Tricks
PreDevCampSF - CSS3 TricksPreDevCampSF - CSS3 Tricks
PreDevCampSF - CSS3 Tricks
 
Doctype html publi
Doctype html publiDoctype html publi
Doctype html publi
 
cssstyle.cssbody { font-family Montserrat, Arial, sa
cssstyle.cssbody {    font-family Montserrat, Arial, sacssstyle.cssbody {    font-family Montserrat, Arial, sa
cssstyle.cssbody { font-family Montserrat, Arial, sa
 
Presentation html5 css3 by thibaut
Presentation html5 css3 by thibautPresentation html5 css3 by thibaut
Presentation html5 css3 by thibaut
 
Responsive Design Tools & Resources
Responsive Design Tools & ResourcesResponsive Design Tools & Resources
Responsive Design Tools & Resources
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

Making Links Magical Again with CSS

  • 1. Making Links Magical Again with CSS Re:build 2012 @jennlukas
  • 2.
  • 3.
  • 4.
  • 6. / Link Transition (all/color) l a { ! text-decoration: none; ! color: #5e9092; ! -webkit-transition: all 0.2s linear; ! -moz-transition: all 0.2s linear; ! -o-transition: all 0.2s linear; ! transition: all 0.2s linear; } a:hover { ! color: #96c0c2; }
  • 9. / Transition (all: BACKGROUND, COLOR,PADDING) l .speakers-list li span { background-color:#222; background:rgba(0,0,0,0.8); color: rgba(255,255,255,0.7); text-transform: uppercase;font-size: 0.7em; position: absolute; right: 0; left: 0; bottom: 0; padding: 5px 10px; ! -webkit-transition: all 0.3s ease-out; ! -moz-transition: all 0.3s ease-out; ! -ms-transition: all 0.3s ease-out; ! -o-transition: all 0.3s ease-out; ! transition: all 0.3s ease-out; } .speakers-list li a:hover span { background: rgba(255,255,255, 0.8); color: #111; padding-bottom: 20px; }
  • 15. / List Item( HTML) l <li> ! <a href="#"> ! ! <div class="grid-info"> ! ! ! <h2><span>Must Follow</span><br /><span>Artist on Twitter</span></h2> ! ! ! <div class="grid-reveal"> ! ! ! ! <p>For those of you with more than three tattoos of the same band, we salute you.</p> ! ! ! ! <p class="grid-sponsor">Sponsored by <img src="http://placekitten.com/ 80/20" width="80" height="20" alt="Loreal Paris" /></p> ! ! ! </div> ! ! </div> ! </a> </li>
  • 16. / List Item(CSS) l li { width: 333px; height: 278px; position: relative; } a { display: block; width: 100%; height: 100%; background: #9cf; text-decoration: none; } .grid-info { position: absolute; bottom: 0; } .grid-reveal { overflow: hidden; max-height: 0; background: #c0b3b3;     -webkit-transition: all 0.7s linear; }                                      a:hover .grid-reveal, a:focus .grid-reveal { max-height: 250px; }
  • 17.
  • 19.
  • 20. / Vote Divs (HTML) l <div class="block-paper grid-item"> ! <a href="#"> ! ! <h3><span>Vote Now!</span> <strong>Category Title</strong></h3> ! ! <p class="grid-desc">They pledge rapid allegiance to the band.</p>! ! ! ! <span class="frame"><img src="http://placehold.it/265x265" alt="" /></span> ! ! <p class="vote-count count-hot"><strong>5,000</strong> votes per hour</p> ! </a>! </div>
  • 21. / Vote Hovers (CSS) l a:hover, a:focus { text-decoration: none; color: #231f20; } a:hover strong, a:focus strong { background: #a2e5d2; } a:hover p.grid-desc, a:focus p.grid-desc { max-height: 300px; margin-bottom: 12px; } a:hover h3 span, a:focus h3 span { max-height: 100px; } a:hover .vote-count, a:focus .vote-count { max-height: 0; margin: 0; padding: 0; }
  • 24.
  • 27. / Navigation and badge hovers l section#header ul li.count a { position:absolute; top:40px; right:640px; color:#282828; -webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease; transition: all 0.5s ease; } section#header ul li.count a:hover { color:#6ebeb7; top:30px; } a.site:hover { top:110px; }
  • 32.
  • 33. / Product HTML l #featured-products_block_center li div.under { ! bottom: 0; ! position: absolute; ! height: 5px; ! background: #fff; ! border-top: 20px #F0F1EC solid; ! left: 0; } #featured-products_block_center li:hover div.under { ! background: #d34132; }
  • 35. / Product link css l a { color: #333; text-decoration: none; text-transform: uppercase; font: bold 12px arial; display: block; position: relative; padding: 10px; } a:after { content: ''; height: 5px; width: 100%; position: absolute; bottom: -20px; left: 0; background: #fff; } a:hover h2 { color: red; } a:hover:after { background: red; }
  • 39.
  • 41. / Link Transition (height, Margin) l join-buttons .daily, .join-buttons .monthly { height: 260px; z-index: 0; margin-top: 30px; ! transition: height .2s linear,margin .2s linear; ! -o-transition: height .2s linear,margin .2s linear; ! -moz-transition: height .2s linear,margin .2s linear; ! -webkit-transition: height .2s linear,margin .2s linear; } .join-buttons .daily:hover, .join-buttons .monthly:hover { height: 280px; margin-top: 20px; } li.button:hover { z-index: 20; }
  • 43. / Hover rotation l .peepcard { width: 125px; height: 189px; float: left; position: relative; ! -webkit-transition: -webkit-transform .2s ease-out; ! -moz-transition: -moz-transform .2s ease-out; ! -o-transition: -o-transform .2s ease-out; } .feat4 { top:13px; left:2px; ! -webkit-transform:rotate(-3deg); ! -moz-transform:rotate(-3deg); ! -ms-transform:rotate(-3deg); ! -o-transform:rotate(-3deg) } .feat4:hover { ! -webkit-transform:rotate(-2deg); ! -moz-transform:rotate(-2deg); ! -ms-transform:rotate(-2deg); ! -o-transform:rotate(-2deg) }
  • 48.
  • 49. / layering opacity effects l .Index .stripe#heroes .arrow.up { background-position: top left; left: 0; } .Index .stripe#heroes .arrow.down { background-position: top right; right: 0; } .Index .stripe#heroes .arrow { background-image: url(/media/marketing/images/heroes/ arrows.png); cursor: pointer; height: 460px; opacity: 0; position: absolute; width: 190px; z-index: 201; ! -webkit-transition: opacity 0.25s; ! -moz-transition: opacity 0.25s; ! -ms-transition: opacity 0.25s; ! -o-transition: opacity 0.25s; ! transition: opacity 0.25s; } .Index .stripe#heroes:hover .arrow.bottom { opacity: 1; } .Index .stripe#heroes .arrow.top:hover { opacity: 1; }
  • 51.
  • 52.
  • 53. / Div mask & width transitions l .marquee .ctaMask {! position:absolute; top:360px; overflow:hidden; width: 51px; ! transition: width 0.5s ease-out; ! -moz-transition: width 0.5s ease-out; ! -webkit-transition: width 0.5s ease-out; } .marqueeWrap.interactive:hover .ctaMask { width:550px; } .marquee .ctaLinks span.link, .marquee .ctaLinks span.arrow.secondary { opacity:0; filter:alpha(opacity=0); ! transition: opacity 0.5s ease-in-out; ! -moz-transition: opacity 0.5s ease-in-out; ! -webkit-transition: opacity 0.5s ease-in-out; } .marqueeWrap.interactive:hover .ctaLinks span.arrow.secondary { ! opacity:1; ! filter:alpha(opacity=100); }
  • 61. / Sliding Box (HTML) l <div> <h2>How Much Does It cost?</h2> <img src="http://placekitten.com/100/50" /> <p>One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. </p> </div>
  • 62. / Sliding Box (CSS) l div { background: #f90; width: 500px; padding: 20px; position: relative; overflow: hidden; } h2 {position: absolute; left: 10px; top: 0px; transition: top 0.2s linear; } position: absolute; right: 20px; bottom: 15px; transition: img { bottom 0.2s linear; } p { opacity: 0; transition: opacity 0.5s linear; }
  • 64. / Sliding Box HOvers(CSS) l div:hover { p {! ! opacity: 1; } img { bottom: -100px; } h2 { top: -100px; } }
  • 65.
  • 73. / CSS Filters (grayscale) l img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter: grayscale(100%); }
  • 75. / CSS Filters (sepia) l img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter: grayscale(100%) sepia(90%); }
  • 77. / CSS Filters (hue-rotate) l img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter: grayscale(100%) sepia(90%) hue-rotate(90deg); }
  • 79. / CSS Filters (contrast) l img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter: grayscale(100%) sepia(90%) hue-rotate(90deg) contrast(110%); }
  • 81. / CSS Filters: Hover l img { margin: 0 0 10px; border-radius: 100px; display: block; -webkit-filter: grayscale(100%) sepia(90%) hue-rotate(90deg) contrast(110%); -webkit-transition: all 0.5s linear; } a:hover, a:focus { img { ! ! -webkit-filter: grayscale(70%) sepia(100%) hue-rotate(0deg) contrast(110%); } span { color: #fff; } }
  • 82.
  • 89. / CSS Filters: Invert l body { background: #818291; font-family: arial; } .wrap { width: 600px; margin: 20px auto; padding: 20px; background: #fff; } h1 { text-transform: uppercase; margin: 0 0 20px; } p { margin-bottom: 20px; } .code-block { border: 5px solid #1d1f1d; background: #fff; font-family: monospace; box-shadow: 2px 2px 5px rgba(0,0,0,0.9);} .code-block:hover { -webkit-filter: invert(1); } .code-block ::selection { background: #3639d9; color: #fff; }
  • 92. / CSS Filters: Invert (The Nerdary) l pre { -moz-border-radius: 5px; -webkit-border-radius: 5px; background: #484742; border-radius: 5px; color: white; font-size: 10pt; font-size: 1rem; padding: 15px; max-width: 580px; overflow: auto; } pre:hover { -webkit-filter: invert(1); }
  • 95. / CSS Filters: Blur l article { padding: 20px; border-bottom: 5px solid #333; background: #fff; color: #222; position: relative; -webkit-filter: blur(2px); }
  • 97. / CSS Filters: Blur l article { padding: 20px; border-bottom: 5px solid #333; background: #fff; color: #222; position: relative; -webkit-filter: blur(2px); } article:hover { -webkit-filter: blur(0px); }
  • 100. / CSS Filters: Blur, Invert l article { padding: 20px; border-bottom: 5px solid #333; background: #fff; color: #222; position: relative; -webkit-filter: blur(2px); } article:hover { -webkit-filter: blur(0px); } article:focus { -webkit-filter: blur(0px) invert(1); }
  • 102. / CSS Generated Messages l article { padding: 20px; border-bottom: 5px solid #333; background: #fff; color: #222; position: relative; -webkit-filter: blur(2px); } article:hover { -webkit-filter: blur(0px); } article:focus { -webkit-filter: blur(0px) invert(1); } article:hover:before { content: 'Click on/off to invert'; position: absolute; right: 5px; top: 5px; background: #000; color: #fff; padding: 5px; font: bold 12px Arial; text-transform: uppercase; }
  • 105.
  • 106.
  • 110.
  • 112. / Burt vs Tom HTML l <header class="wrap"> ! <h1>Tom Selleck or Burt Reynolds?!?</h1> ! <p class="adjunct"><strong class="left">Tom Selleck</strong> <strong class="right">Burt Reynolds</strong></p> </header> <div role="main" class="wrap"> ! <div class="tom"><span><img src="i/1.jpeg" alt="1" width="" height="" /></span> <strong>It's Tom!!</strong></div> ! <div class="burt"><span><img src="i/3.jpeg" alt="1" width="" height="" /></span> <strong>Burt here!!</strong></div> ! <div class="tom"><span><img src="i/4.jpeg" alt="1" width="" height="" /></span> <strong>Tom strikes again!!</strong></div> ! <div class="burt"><span><img src="i/5.jpeg" alt="1" width="" height="" /></span> <strong>Burt is the word!!</strong></div> </div>
  • 113. / Burt vs Tom CSS l div { width: 100%; position: relative; min-height: 95px; margin: 0 0 5px; } span { position: absolute; display: block; padding: 10px 0 5px; width: 100px; text- align: center; -webkit-transition: all 0.35s ease-in-out 0.5s; } .tom span { left: 330px; } .burt span { right: 330px; } .tom:hover span { left: 0; } .burt:hover span { right: 0; } img { display: inline-block; } div strong { display: block; padding: 15px 0 0 110px; opacity: 0; -webkit-transition: opacity 0.35s ease-in-out 0.6s; } div.burt strong { padding: 15px 110px 0 0; text-align: right; } div:hover > strong { opacity: 1; }
  • 114. This cat totally loves hovers.