Last active
August 29, 2015 13:56
-
-
Save leidottw/9028897 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="banner"> | |
| <div class="picture"> | |
| <img src="http://www.cite.com.tw/index_box/img/t-20140215_paperfilm_632x187.jpg"> | |
| <img src="http://www.cite.com.tw/index_box/img/2014ibf.jpeg"> | |
| <img src="http://www.cite.com.tw/index_box/img/t-20140114_soloma_632x187.jpg"> | |
| </div> | |
| <div class="dot"> | |
| <ul> | |
| <li data-order="0">❖</li> | |
| <li data-order="1">❖</li> | |
| <li data-order="2">❖</li> | |
| </ul> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---- | |
| // Sass (v3.3.0.rc.4) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| @import "compass/reset"; | |
| @import "compass/css3"; | |
| .banner { | |
| position: relative; | |
| width: 632px; | |
| .picture { | |
| overflow: hidden; | |
| white-space: nowrap; | |
| @include transition-property(margin-left); | |
| @include transition-duration(0.5s); | |
| } | |
| .dot { | |
| position: absolute; | |
| right: 5px; | |
| bottom: 5px; | |
| padding: 5px; | |
| background-color: rgba(33, 33, 33, 0.7); | |
| @include border-radius(10px); | |
| li { | |
| font-size: 2rem; | |
| color: white; | |
| display: inline-block; | |
| @include opacity(0.3); | |
| @include transition-property(opacity); | |
| @include transition-duration(0.5s); | |
| &.here { | |
| @include opacity(1); | |
| cursor: pointer; | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, | |
| b, u, i, center, | |
| dl, dt, dd, ol, ul, li, | |
| fieldset, form, label, legend, | |
| table, caption, tbody, tfoot, thead, tr, th, td, | |
| article, aside, canvas, details, embed, | |
| figure, figcaption, footer, header, hgroup, | |
| menu, nav, output, ruby, section, summary, | |
| time, mark, audio, video { | |
| margin: 0; | |
| padding: 0; | |
| border: 0; | |
| font: inherit; | |
| font-size: 100%; | |
| vertical-align: baseline; | |
| } | |
| html { | |
| line-height: 1; | |
| } | |
| ol, ul { | |
| list-style: none; | |
| } | |
| table { | |
| border-collapse: collapse; | |
| border-spacing: 0; | |
| } | |
| caption, th, td { | |
| text-align: left; | |
| font-weight: normal; | |
| vertical-align: middle; | |
| } | |
| q, blockquote { | |
| quotes: none; | |
| } | |
| q:before, q:after, blockquote:before, blockquote:after { | |
| content: ""; | |
| content: none; | |
| } | |
| a img { | |
| border: none; | |
| } | |
| article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { | |
| display: block; | |
| } | |
| .banner { | |
| position: relative; | |
| width: 632px; | |
| } | |
| .banner .picture { | |
| overflow: hidden; | |
| white-space: nowrap; | |
| -moz-transition-property: margin-left; | |
| -o-transition-property: margin-left; | |
| -webkit-transition-property: margin-left; | |
| transition-property: margin-left; | |
| -moz-transition-duration: 0.5s; | |
| -o-transition-duration: 0.5s; | |
| -webkit-transition-duration: 0.5s; | |
| transition-duration: 0.5s; | |
| } | |
| .banner .dot { | |
| position: absolute; | |
| right: 5px; | |
| bottom: 5px; | |
| padding: 5px; | |
| background-color: rgba(33, 33, 33, 0.7); | |
| -moz-border-radius: 10px; | |
| -webkit-border-radius: 10px; | |
| border-radius: 10px; | |
| } | |
| .banner .dot li { | |
| font-size: 2rem; | |
| color: white; | |
| display: inline-block; | |
| filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30); | |
| opacity: 0.3; | |
| -moz-transition-property: opacity; | |
| -o-transition-property: opacity; | |
| -webkit-transition-property: opacity; | |
| transition-property: opacity; | |
| -moz-transition-duration: 0.5s; | |
| -o-transition-duration: 0.5s; | |
| -webkit-transition-duration: 0.5s; | |
| transition-duration: 0.5s; | |
| } | |
| .banner .dot li.here { | |
| filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false); | |
| opacity: 1; | |
| cursor: pointer; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="banner"> | |
| <div class="picture"> | |
| <img src="http://www.cite.com.tw/index_box/img/t-20140215_paperfilm_632x187.jpg"> | |
| <img src="http://www.cite.com.tw/index_box/img/2014ibf.jpeg"> | |
| <img src="http://www.cite.com.tw/index_box/img/t-20140114_soloma_632x187.jpg"> | |
| </div> | |
| <div class="dot"> | |
| <ul> | |
| <li data-order="0">❖</li> | |
| <li data-order="1">❖</li> | |
| <li data-order="2">❖</li> | |
| </ul> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('.dot li').on('mouseenter', function() { | |
| $('.dot li').removeClass('here'); | |
| $(this).addClass('here'); | |
| $('.picture').css('margin-left', '-' + this.dataset.order + '00%'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment