├── img └── related │ ├── SelectInspiration.png │ ├── ShapeHoverEffect.png │ ├── AnimatedCheckboxes.png │ ├── DragDropInteractions.png │ └── WobblySlideshowEffect.png ├── fonts ├── codropsicons │ ├── codropsicons.eot │ ├── codropsicons.ttf │ ├── codropsicons.woff │ ├── license.txt │ └── codropsicons.svg └── font-awesome-4.2.0 │ ├── fonts │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff │ └── css │ └── font-awesome.min.css ├── README.md ├── css ├── hamburger.css ├── normalize.css ├── drag.css ├── button.css ├── collapseexpand.css ├── inputs.css ├── dropdown.css ├── pullupmenu.css ├── circlemenu.css ├── sidebar.css └── demo.css ├── js ├── classie.js ├── modernizr.custom.js └── draggabilly.pkgd.min.js ├── pullupmenu.html ├── hamburger.html ├── index.html ├── dropdown.html ├── circlemenu.html ├── drag.html ├── inputs.html ├── collapseexpand.html └── button.html /img/related/SelectInspiration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/img/related/SelectInspiration.png -------------------------------------------------------------------------------- /img/related/ShapeHoverEffect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/img/related/ShapeHoverEffect.png -------------------------------------------------------------------------------- /fonts/codropsicons/codropsicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/fonts/codropsicons/codropsicons.eot -------------------------------------------------------------------------------- /fonts/codropsicons/codropsicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/fonts/codropsicons/codropsicons.ttf -------------------------------------------------------------------------------- /img/related/AnimatedCheckboxes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/img/related/AnimatedCheckboxes.png -------------------------------------------------------------------------------- /fonts/codropsicons/codropsicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/fonts/codropsicons/codropsicons.woff -------------------------------------------------------------------------------- /img/related/DragDropInteractions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/img/related/DragDropInteractions.png -------------------------------------------------------------------------------- /img/related/WobblySlideshowEffect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/img/related/WobblySlideshowEffect.png -------------------------------------------------------------------------------- /fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/ElasticSVGElements/HEAD/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /fonts/codropsicons/license.txt: -------------------------------------------------------------------------------- 1 | Icon Set: Font Awesome -- http://fortawesome.github.com/Font-Awesome/ 2 | License: SIL -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | 4 | 5 | Icon Set: Eco Ico -- http://dribbble.com/shots/665585-Eco-Ico 6 | License: CC0 -- http://creativecommons.org/publicdomain/zero/1.0/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Elastic SVG Elements 2 | ========= 3 | 4 | Adding elasticity with SVG shape animations for enhanced UI interactions. 5 | 6 | [Article on Codrops](http://tympanus.net/codrops/?p=21555) 7 | 8 | [Demo](http://tympanus.net/Development/ElasticSVGElements/) 9 | 10 | Integrate or build upon it for free in your personal or commercial projects. Don't republish, redistribute or sell "as-is". 11 | 12 | Read more here: [License](http://tympanus.net/codrops/licensing/) 13 | 14 | Follow us: [Twitter](http://www.twitter.com/codrops), [Facebook](http://www.facebook.com/pages/Codrops/159107397912), [Google+](https://plus.google.com/101095823814290637419), [GitHub](https://github.com/codrops), [Pinterest](http://www.pinterest.com/codrops/) 15 | 16 | [© Codrops 2014](http://www.codrops.com) 17 | -------------------------------------------------------------------------------- /css/hamburger.css: -------------------------------------------------------------------------------- 1 | .menu-button { 2 | width: 60px; 3 | height: 80px; 4 | position: relative; 5 | margin: 5em auto; 6 | display: block; 7 | background: none; 8 | outline: none; 9 | border: none; 10 | -webkit-tap-highlight-color: rgba(0,0,0,0); 11 | -webkit-tap-highlight-color: transparent; /* For some Androids */ 12 | } 13 | 14 | .morph-shape { 15 | position: absolute; 16 | width: 100%; 17 | height: 100%; 18 | top: 0; 19 | left: 0; 20 | } 21 | 22 | .morph-shape svg path, 23 | .morph-shape svg line { 24 | stroke: #DDDCD7; 25 | stroke-width: 4px; 26 | -webkit-transition: -webkit-transform 0.3s; 27 | transition: transform 0.3s; 28 | } 29 | 30 | .menu-button--open .morph-shape svg path:first-of-type { 31 | -webkit-transform: translate3d(0, -8px, 0); 32 | transform: translate3d(0, -8px, 0); 33 | } 34 | 35 | .menu-button--open .morph-shape svg path:nth-of-type(2) { 36 | -webkit-transform: translate3d(0, 8px, 0); 37 | transform: translate3d(0, 8px, 0); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /css/normalize.css: -------------------------------------------------------------------------------- 1 | article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden]{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;} -------------------------------------------------------------------------------- /css/drag.css: -------------------------------------------------------------------------------- 1 | .drag-container { 2 | max-width: 840px; 3 | margin: 0 auto; 4 | } 5 | 6 | .drag-element { 7 | width: 260px; 8 | height: 260px; 9 | margin: 10px; 10 | position: relative; 11 | float: left; 12 | } 13 | 14 | .drag-element:hover { 15 | cursor: move; 16 | cursor: -webkit-grab; 17 | cursor: grab; 18 | } 19 | 20 | .drag-element:active, 21 | .drag-element.is-dragging { 22 | cursor: -webkit-grabbing; 23 | cursor: grabbing; 24 | } 25 | 26 | .drag-element .fa { 27 | display: block; 28 | line-height: 260px; 29 | text-align: center; 30 | color: #aaa; 31 | position: relative; 32 | width: 100%; 33 | -webkit-transition: -webkit-transform 0.1s ease-in-out; 34 | transition: transform 0.1s ease-in-out; 35 | } 36 | 37 | .drag-element--alt .fa { 38 | -webkit-transition: -webkit-transform 0.05s ease-in; 39 | transition: transform 0.05s ease-in; 40 | } 41 | 42 | .drag-element:active .fa, 43 | .drag-element.is-dragging .fa { 44 | -webkit-transform: scale3d(1.2, 1.2, 1); 45 | transform: scale3d(1.2, 1.2, 1); 46 | } 47 | 48 | .morph-shape { 49 | position: absolute; 50 | width: 100%; 51 | height: 100%; 52 | top: 0; 53 | left: 0; 54 | -webkit-transition: -webkit-transform 0.1s ease-in-out; 55 | transition: transform 0.1s ease-in-out; 56 | } 57 | 58 | .drag-element--alt .morph-shape { 59 | -webkit-transition: -webkit-transform 0.05s ease-in; 60 | transition: transform 0.05s ease-in; 61 | } 62 | 63 | .drag-element:active .morph-shape, 64 | .drag-element.is-dragging .morph-shape { 65 | -webkit-transform: scale3d(0.88, 0.9, 1); 66 | transform: scale3d(0.88, 0.9, 1); 67 | } 68 | 69 | .morph-shape svg path { 70 | fill: #44474D; 71 | -webkit-transition: fill 0.2s; 72 | transition: fill 0.2s; 73 | } 74 | 75 | .drag-element:active .morph-shape svg path, 76 | .drag-element.is-dragging .morph-shape svg path { 77 | fill: #484b51; 78 | } 79 | 80 | -------------------------------------------------------------------------------- /css/button.css: -------------------------------------------------------------------------------- 1 | .button-wrap { 2 | margin-bottom: 3em; 3 | } 4 | 5 | .button { 6 | background: none; 7 | border: none; 8 | width: 250px; 9 | height: 105px; 10 | outline: none; 11 | position: relative; 12 | margin: 1em; 13 | padding: 0; 14 | -webkit-tap-highlight-color: rgba(0,0,0,0); 15 | -webkit-tap-highlight-color: transparent; /* For some Androids */ 16 | -webkit-touch-callout: none; 17 | -webkit-user-select: none; 18 | -khtml-user-select: none; 19 | -moz-user-select: none; 20 | -ms-user-select: none; 21 | user-select: none; 22 | } 23 | 24 | .button--round { 25 | width: 150px; 26 | height: 150px; 27 | } 28 | 29 | .button__text { 30 | display: block; 31 | padding: 10px; 32 | text-align: center; 33 | position: relative; 34 | z-index: 100; 35 | font-size: 1.5em; 36 | color: #fff; 37 | font-weight: bold; 38 | -webkit-touch-callout: none; 39 | -webkit-user-select: none; 40 | -khtml-user-select: none; 41 | -moz-user-select: none; 42 | -ms-user-select: none; 43 | user-select: none; 44 | } 45 | 46 | .morph-shape { 47 | position: absolute; 48 | width: 100%; 49 | height: 100%; 50 | top: 0; 51 | left: 0; 52 | } 53 | 54 | .button--line .morph-shape svg { 55 | fill: none; 56 | stroke: #fff; 57 | stroke-width: 4px; 58 | stroke-linecap: round; 59 | } 60 | 61 | .button--line:nth-child(2) .morph-shape svg { 62 | fill: #938edc; 63 | } 64 | 65 | .button--fill .morph-shape svg { 66 | fill: #44474D; 67 | } 68 | 69 | .button--fill:nth-child(4) .morph-shape svg { 70 | fill: #202020; 71 | } 72 | 73 | .button--round .morph-shape svg { 74 | stroke-width: 7px; 75 | } 76 | 77 | /* Example for effect */ 78 | 79 | .button--anim-1 .button__text { 80 | -webkit-transition: -webkit-transform 0.15s; 81 | transition: transform 0.15s; 82 | } 83 | 84 | .button--anim-1:active .button__text { 85 | -webkit-transform: translate3d(0, -5px, 0); 86 | transform: translate3d(0, -5px, 0); 87 | } -------------------------------------------------------------------------------- /js/classie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * classie - class helper functions 3 | * from bonzo https://github.com/ded/bonzo 4 | * 5 | * classie.has( elem, 'my-class' ) -> true/false 6 | * classie.add( elem, 'my-new-class' ) 7 | * classie.remove( elem, 'my-unwanted-class' ) 8 | * classie.toggle( elem, 'my-class' ) 9 | */ 10 | 11 | /*jshint browser: true, strict: true, undef: true */ 12 | /*global define: false */ 13 | 14 | ( function( window ) { 15 | 16 | 'use strict'; 17 | 18 | // class helper functions from bonzo https://github.com/ded/bonzo 19 | 20 | function classReg( className ) { 21 | return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); 22 | } 23 | 24 | // classList support for class management 25 | // altho to be fair, the api sucks because it won't accept multiple classes at once 26 | var hasClass, addClass, removeClass; 27 | 28 | if ( 'classList' in document.documentElement ) { 29 | hasClass = function( elem, c ) { 30 | return elem.classList.contains( c ); 31 | }; 32 | addClass = function( elem, c ) { 33 | elem.classList.add( c ); 34 | }; 35 | removeClass = function( elem, c ) { 36 | elem.classList.remove( c ); 37 | }; 38 | } 39 | else { 40 | hasClass = function( elem, c ) { 41 | return classReg( c ).test( elem.className ); 42 | }; 43 | addClass = function( elem, c ) { 44 | if ( !hasClass( elem, c ) ) { 45 | elem.className = elem.className + ' ' + c; 46 | } 47 | }; 48 | removeClass = function( elem, c ) { 49 | elem.className = elem.className.replace( classReg( c ), ' ' ); 50 | }; 51 | } 52 | 53 | function toggleClass( elem, c ) { 54 | var fn = hasClass( elem, c ) ? removeClass : addClass; 55 | fn( elem, c ); 56 | } 57 | 58 | var classie = { 59 | // full names 60 | hasClass: hasClass, 61 | addClass: addClass, 62 | removeClass: removeClass, 63 | toggleClass: toggleClass, 64 | // short names 65 | has: hasClass, 66 | add: addClass, 67 | remove: removeClass, 68 | toggle: toggleClass 69 | }; 70 | 71 | // transport 72 | if ( typeof define === 'function' && define.amd ) { 73 | // AMD 74 | define( classie ); 75 | } else { 76 | // browser global 77 | window.classie = classie; 78 | } 79 | 80 | })( window ); 81 | -------------------------------------------------------------------------------- /css/collapseexpand.css: -------------------------------------------------------------------------------- 1 | .box-container { 2 | max-width: 840px; 3 | min-height: 335px; 4 | margin: 0 auto; 5 | clear: both; 6 | } 7 | 8 | .box-container h2 { 9 | text-align: left; 10 | padding: 0 1.5em; 11 | margin: 0; 12 | color: #afb3b8; 13 | } 14 | 15 | .box-container--large { 16 | min-height: 400px; 17 | } 18 | 19 | .box { 20 | width: 260px; 21 | height: 260px; 22 | margin: 10px; 23 | float: left; 24 | position: relative; 25 | } 26 | 27 | .box--collapser { 28 | -webkit-transition: -webkit-transform 0.15s, opacity 0.15s; 29 | transition: transform 0.15s, opacity 0.15s; 30 | } 31 | 32 | .box--expander { 33 | width: 25%; 34 | min-width: 260px; 35 | height: 260px; 36 | float: none; 37 | margin: 0 auto; 38 | -webkit-transition: width 0.2s, height 0.2s; 39 | transition: width 0.2s, height 0.2s; 40 | } 41 | 42 | .box--collapser.box--close { 43 | opacity: 0; 44 | -webkit-transform: scale3d(0,0,1); 45 | transform: scale3d(0,0,1); 46 | } 47 | 48 | .box--expander.box--sizeup { 49 | width: 100%; 50 | height: 500px; 51 | } 52 | 53 | .trigger { 54 | background: none; 55 | color: #F5F5F5; 56 | border: none; 57 | width: 30px; 58 | height: 30px; 59 | line-height: 25px; 60 | position: absolute; 61 | right: 10%; 62 | top: 10.5%; 63 | outline: none; 64 | padding: 0; 65 | margin: 0; 66 | } 67 | 68 | .trigger .fa-compress, 69 | .box--sizeup .trigger .fa-expand { 70 | display: none; 71 | } 72 | 73 | .box--sizeup .trigger .fa-compress { 74 | display: inline-block; 75 | } 76 | 77 | .morph-shape { 78 | position: absolute; 79 | width: 100%; 80 | height: 100%; 81 | top: 0; 82 | left: 0; 83 | -webkit-transition: -webkit-transform 0.1s ease-in-out; 84 | transition: transform 0.1s ease-in-out; 85 | } 86 | 87 | .drag-element--alt .morph-shape { 88 | -webkit-transition: -webkit-transform 0.05s ease-in; 89 | transition: transform 0.05s ease-in; 90 | } 91 | 92 | .morph-shape--color-1 svg path { 93 | fill: #4E574B; 94 | } 95 | 96 | .morph-shape--color-2 svg path { 97 | fill: #EA5656; 98 | } 99 | 100 | .morph-shape--color-3 svg path { 101 | fill: #4E82E0; 102 | } 103 | 104 | .morph-shape--color-4 svg path { 105 | fill: #71CF84; 106 | } 107 | 108 | -------------------------------------------------------------------------------- /css/inputs.css: -------------------------------------------------------------------------------- 1 | .input-container { 2 | text-align: left; 3 | max-width: 600px; 4 | margin: 0 auto; 5 | } 6 | 7 | .input-container--indent { 8 | padding-left: 160px; 9 | } 10 | 11 | .input-container--space { 12 | margin-top: 1em; 13 | } 14 | 15 | .input-label { 16 | font-weight: bold; 17 | display: inline-block; 18 | line-height: 80px; 19 | height: 60px; 20 | width: 150px; 21 | padding: 0 1em 0 0; 22 | text-align: right; 23 | color: #FF75AF; 24 | -webkit-touch-callout: none; 25 | -webkit-user-select: none; 26 | -khtml-user-select: none; 27 | -moz-user-select: none; 28 | -ms-user-select: none; 29 | user-select: none; 30 | } 31 | 32 | .input-label--long { 33 | float: left; 34 | width: calc(100% - 50px); 35 | text-align: left; 36 | padding: 0 0 1em 1em; 37 | } 38 | 39 | .input-wrap { 40 | position: relative; 41 | margin: 0 auto 1em; 42 | display: inline-block; 43 | vertical-align: top; 44 | width: 370px; 45 | height: 80px; 46 | } 47 | 48 | .input-wrap--small { 49 | width: 30px; 50 | height: 30px; 51 | float: left; 52 | margin: 23px 10px 0; 53 | } 54 | 55 | .input-wrap input[type="text"] { 56 | display: block; 57 | width: 94.6%; 58 | height: 75%; 59 | border: none; 60 | position: relative; 61 | background: none; 62 | z-index: 100; 63 | outline: none; 64 | font-size: 1.5em; 65 | font-weight: bold; 66 | color: #aaa; 67 | left: 2.7%; 68 | top: 12.5%; 69 | padding: 0 0.75em; 70 | -webkit-tap-highlight-color: rgba(0,0,0,0); 71 | -webkit-tap-highlight-color: transparent; /* For some Androids */ 72 | } 73 | 74 | .input-wrap input[type="checkbox"], 75 | .input-wrap input[type="radio"], 76 | .input-wrap .fa { 77 | position: absolute; 78 | width: 100%; 79 | height: 100%; 80 | z-index: 100; 81 | opacity: 0; 82 | cursor: pointer; 83 | -webkit-tap-highlight-color: rgba(0,0,0,0); 84 | -webkit-tap-highlight-color: transparent; /* For some Androids */ 85 | -webkit-touch-callout: none; 86 | -webkit-user-select: none; 87 | -khtml-user-select: none; 88 | -moz-user-select: none; 89 | -ms-user-select: none; 90 | user-select: none; 91 | } 92 | 93 | .input-wrap .fa { 94 | z-index: 99; 95 | line-height: 2; 96 | color: #415c71; 97 | } 98 | 99 | .input-wrap input[type="checkbox"]:checked + .fa, 100 | .input-wrap input[type="radio"]:checked + .fa { 101 | opacity: 1; 102 | } 103 | 104 | .morph-shape { 105 | position: absolute; 106 | width: 100%; 107 | height: 100%; 108 | top: 0; 109 | left: 0; 110 | pointer-events: none; 111 | } 112 | 113 | .morph-shape svg path { 114 | fill: #fff; 115 | } 116 | 117 | .note { 118 | text-align: left; 119 | max-width: 600px; 120 | padding: 1em 0 0.5em; 121 | font-size: 1em; 122 | color: #CBCBCB; 123 | border-bottom: 1px solid #ddd; 124 | margin: 0 auto 1em; 125 | } 126 | 127 | @media screen and (max-width: 60em) { 128 | .input-label, .input-label--long { 129 | text-align: left; 130 | padding: 0; 131 | } 132 | .input-container--indent { 133 | padding: 0; 134 | } 135 | .input-wrap:not(.input-wrap--small) { 136 | width: 100%; 137 | } 138 | } -------------------------------------------------------------------------------- /css/dropdown.css: -------------------------------------------------------------------------------- 1 | .menu { 2 | width: 300px; 3 | height: 70px; 4 | margin: 2em auto; 5 | position: relative; 6 | text-align: left; 7 | cursor: pointer; 8 | z-index: 100; 9 | } 10 | 11 | .menu__label { 12 | display: block; 13 | background: none; 14 | border: none; 15 | width: 100%; 16 | height: 70px; 17 | padding: 0 1.25em; 18 | font-size: 1.3em; 19 | color: #fff; 20 | position: relative; 21 | outline: none; 22 | text-align: left; 23 | -webkit-tap-highlight-color: rgba(0,0,0,0); 24 | -webkit-tap-highlight-color: transparent; /* For some Androids */ 25 | } 26 | 27 | .menu__inner li a span, 28 | .menu__label span { 29 | font-size: 0.68em; 30 | text-transform: uppercase; 31 | letter-spacing: 1px; 32 | line-height: 1.2; 33 | font-weight: 600; 34 | } 35 | 36 | .menu .fa { 37 | vertical-align: top; 38 | line-height: 1.25; 39 | margin-right: 0.65em; 40 | font-size: 1.15em; 41 | } 42 | 43 | .menu__inner { 44 | list-style: none; 45 | padding: 0 1.25em; 46 | font-size: 1.3em; 47 | margin: 0; 48 | position: absolute; 49 | overflow: hidden; 50 | height: 0; 51 | -webkit-transition: height 0.5s cubic-bezier(0.7, 0, 0.3, 1); 52 | transition: height 0.5s cubic-bezier(0.7, 0, 0.3, 1); 53 | } 54 | 55 | .menu.menu--open .menu__inner { 56 | height: 310px; 57 | } 58 | 59 | .menu__inner li a { 60 | display: block; 61 | padding: 0.53em 0; 62 | line-height: 1.2; 63 | opacity: 0; 64 | color: #727476; 65 | pointer-events: none; 66 | outline: none; 67 | -webkit-transform: translate3d(0, -20px, 0); 68 | transform: translate3d(0, -20px, 0); 69 | -webkit-transition: opacity 0.3s, -webkit-transform 0.3s; 70 | transition: opacity 0.3s, transform 0.3s; 71 | } 72 | 73 | .menu__inner li a:hover { 74 | color: #45484A; 75 | } 76 | 77 | .menu--open .menu__inner li a { 78 | opacity: 1; 79 | pointer-events: auto; 80 | -webkit-transform: translate3d(0, 0, 0); 81 | transform: translate3d(0, 0, 0); 82 | } 83 | 84 | .menu--open .menu__inner li:nth-child(2) a { 85 | -webkit-transition-delay: 0.04s; 86 | transition-delay: 0.04s; 87 | } 88 | 89 | .menu--open .menu__inner li:nth-child(3) a { 90 | -webkit-transition-delay: 0.08s; 91 | transition-delay: 0.08s; 92 | } 93 | 94 | .menu--open .menu__inner li:nth-child(4) a { 95 | -webkit-transition-delay: 0.12s; 96 | transition-delay: 0.12s; 97 | } 98 | 99 | .menu--open .menu__inner li:nth-child(5) a { 100 | -webkit-transition-delay: 0.16s; 101 | transition-delay: 0.16s; 102 | } 103 | 104 | .menu--open .menu__inner li:nth-child(6) a { 105 | -webkit-transition-delay: 0.2s; 106 | transition-delay: 0.2s; 107 | } 108 | 109 | .morph-shape, 110 | .morph-shape svg { 111 | position: absolute; 112 | width: 100%; 113 | top: 0; 114 | left: 0; 115 | } 116 | 117 | .morph-shape { 118 | height: 70px; 119 | -webkit-transition: height 0.5s cubic-bezier(0.7, 0, 0.3, 1); 120 | transition: height 0.5s cubic-bezier(0.7, 0, 0.3, 1); 121 | } 122 | 123 | .morph-shape svg { 124 | height: 100%; 125 | } 126 | 127 | .menu.menu--open .morph-shape { 128 | height: 400px; 129 | } 130 | 131 | .morph-shape svg path { 132 | fill: #C6CFCF; 133 | } -------------------------------------------------------------------------------- /fonts/codropsicons/codropsicons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /css/pullupmenu.css: -------------------------------------------------------------------------------- 1 | .menu { 2 | position: fixed; 3 | max-width: 560px; 4 | width: 90%; 5 | height: 360px; 6 | bottom: 0; 7 | left: 50%; 8 | z-index: 100; 9 | pointer-events: none; 10 | -webkit-transform: translate3d(-50%, 240px, 0); 11 | transform: translate3d(-50%, 240px, 0); 12 | -webkit-transition: -webkit-transform 0.6s; 13 | transition: transform 0.6s; 14 | } 15 | 16 | .menu.menu--open { 17 | pointer-events: auto; 18 | -webkit-transform: translate3d(-50%, 0, 0); 19 | transform: translate3d(-50%, 0, 0); 20 | } 21 | 22 | .main { 23 | -webkit-transition: opacity 0.6s; 24 | transition: opacity 0.6s; 25 | } 26 | 27 | .menu.menu--open + .main { 28 | opacity: 0.1; 29 | pointer-events: none; 30 | } 31 | 32 | .menu__inner { 33 | padding: 120px 2em 0; 34 | height: 100%; 35 | position: relative; 36 | z-index: 100; 37 | } 38 | 39 | .menu ul { 40 | list-style: none; 41 | padding: 0; 42 | margin: 0; 43 | } 44 | 45 | .menu ul li { 46 | margin: 0; 47 | -webkit-transform: translate3d(0, 150px, 0); 48 | transform: translate3d(0, 150px, 0); 49 | -webkit-transition: -webkit-transform 0.7s; 50 | transition: transform 0.7s; 51 | } 52 | 53 | .menu.menu--anim ul li { 54 | -webkit-transform: translate3d(0, 0, 0); 55 | transform: translate3d(0, 0, 0); 56 | } 57 | 58 | .menu.menu--anim ul li:last-child { 59 | -webkit-transition-delay: 0.3s; 60 | transition-delay: 0.3s; 61 | } 62 | 63 | .menu.menu--anim ul li:nth-child(3) { 64 | -webkit-transition-delay: 0.2s; 65 | transition-delay: 0.2s; 66 | } 67 | 68 | .menu.menu--anim ul li:nth-child(2) { 69 | -webkit-transition-delay: 0.1s; 70 | transition-delay: 0.1s; 71 | } 72 | 73 | .menu ul li a { 74 | display: block; 75 | outline: none; 76 | font-size: 1.15em; 77 | font-weight: bold; 78 | padding: 0.85em; 79 | } 80 | 81 | .menu__handle { 82 | background: transparent; 83 | border: none; 84 | width: 30px; 85 | height: 18px; 86 | padding: 0; 87 | outline: none; 88 | position: absolute; 89 | top: 66px; 90 | left: 50%; 91 | margin-left: -15px; 92 | z-index: 2000; 93 | pointer-events: auto; 94 | } 95 | 96 | .menu__handle::before, 97 | .menu__handle::after { 98 | content: ''; 99 | position: absolute; 100 | width: 2px; 101 | height: 100%; 102 | background: #5f656f; 103 | left: 50%; 104 | top: 0; 105 | margin-left: -1px; 106 | -webkit-transform-origin: 50% 0; 107 | transform-origin: 50% 0; 108 | -webkit-transition: -webkit-transform 0.25s; 109 | transition: transform 0.25s; 110 | } 111 | 112 | .menu__handle span { 113 | display: none; 114 | } 115 | 116 | .menu__handle::before { 117 | -webkit-transform: rotate3d(0, 0, 1, 45deg); 118 | transform: rotate3d(0, 0, 1, 45deg); 119 | } 120 | 121 | .menu__handle::after { 122 | -webkit-transform: rotate3d(0, 0, 1, -45deg); 123 | transform: rotate3d(0, 0, 1, -45deg); 124 | } 125 | 126 | .menu--open .menu__handle::before { 127 | -webkit-transform: translate3d(0, 75%, 0) rotate3d(0, 0, 1, 135deg); 128 | transform: translate3d(0, 75%, 0) rotate3d(0, 0, 1, 135deg); 129 | } 130 | 131 | .menu--open .menu__handle::after { 132 | -webkit-transform: translate3d(0, 75%, 0) rotate3d(0, 0, 1, -135deg); 133 | transform: translate3d(0, 75%, 0) rotate3d(0, 0, 1, -135deg); 134 | } 135 | 136 | .morph-shape { 137 | position: absolute; 138 | height: 200px; 139 | width: 100%; 140 | top: 0; 141 | right: 0; 142 | } 143 | 144 | .morph-shape svg path { 145 | stroke: #5f656f; 146 | stroke-width: 2px; 147 | } 148 | 149 | @media screen and (max-width: 63em) { 150 | .menu { 151 | background: #434d55; 152 | background: -webkit-linear-gradient(top, rgba(67,77,85,0) 0%,rgba(67,77,85,1) 20%); 153 | background: linear-gradient(to bottom, rgba(67,77,85,0) 0%, rgba(67,77,85,1) 20%); 154 | } 155 | .menu.menu--open + .main { 156 | opacity: 0.05; 157 | } 158 | } -------------------------------------------------------------------------------- /css/circlemenu.css: -------------------------------------------------------------------------------- 1 | .menu { 2 | position: relative; 3 | display: inline-block; 4 | -webkit-touch-callout: none; 5 | -webkit-user-select: none; 6 | -khtml-user-select: none; 7 | -moz-user-select: none; 8 | -ms-user-select: none; 9 | user-select: none; 10 | cursor: pointer; 11 | margin: 7em 0; 12 | } 13 | 14 | .trigger { 15 | background: none; 16 | width: 100px; 17 | height: 100px; 18 | padding: 0; 19 | margin: 0; 20 | border: none; 21 | outline: none; 22 | text-align: center; 23 | font-size: 1.5em; 24 | color: #fff; 25 | position: relative; 26 | z-index: 1000; 27 | -webkit-tap-highlight-color: rgba(0,0,0,0); 28 | -webkit-tap-highlight-color: transparent; /* For some Androids */ 29 | } 30 | 31 | .trigger span { 32 | opacity: 0; 33 | position: absolute; 34 | } 35 | 36 | .menu__items { 37 | position: absolute; 38 | width: 100%; 39 | height: 100%; 40 | top: 0; 41 | padding: 0; 42 | margin: 0; 43 | list-style-type: none; 44 | z-index: 5; 45 | } 46 | 47 | .menu__items li { 48 | width: 80%; 49 | height: 80%; 50 | top: 10%; 51 | left: 10%; 52 | line-height: 80px; 53 | font-size: 1.5em; 54 | position: absolute; 55 | z-index: -1; 56 | -webkit-transform-origin: 50% 50%; 57 | transform-origin: 50% 50%; 58 | -webkit-transform: scale3d(0.5, 0.5, 1); 59 | transform: scale3d(0.5, 0.5, 1); 60 | -webkit-transition: -webkit-transform 0.25s ease-out; 61 | transition: transform 0.25s ease-out; 62 | } 63 | 64 | .menu.menu--open .menu__items li:first-child { 65 | -webkit-transform: scale3d(1, 1, 1) translate3d(0, -160px, 0); 66 | transform: scale3d(1, 1, 1) translate3d(0, -160px, 0); 67 | } 68 | 69 | .menu.menu--open .menu__items li:nth-child(2) { 70 | -webkit-transform: scale3d(1, 1, 1) translate3d(113.14px, -113.14px, 0); 71 | transform: scale3d(1, 1, 1) translate3d(113.14px, -113.14px, 0); 72 | } 73 | 74 | .menu.menu--open .menu__items li:nth-child(3) { 75 | -webkit-transform: scale3d(1, 1, 1) translate3d(160px, 0, 0); 76 | transform: scale3d(1, 1, 1) translate3d(160px, 0, 0); 77 | } 78 | 79 | .menu.menu--open .menu__items li:nth-child(4) { 80 | -webkit-transform: scale3d(1, 1, 1) translate3d(113.14px, 113.14px, 0); 81 | transform: scale3d(1, 1, 1) translate3d(113.14px, 113.14px, 0); 82 | } 83 | 84 | .menu.menu--open .menu__items li:nth-child(5) { 85 | -webkit-transform: scale3d(1, 1, 1) translate3d(0, 160px, 0); 86 | transform: scale3d(1, 1, 1) translate3d(0, 160px, 0); 87 | } 88 | 89 | .menu.menu--open .menu__items li:nth-child(6) { 90 | -webkit-transform: scale3d(1, 1, 1) translate3d(-113.14px, 113.14px, 0); 91 | transform: scale3d(1, 1, 1) translate3d(-113.14px, 113.14px, 0); 92 | } 93 | 94 | .menu.menu--open .menu__items li:nth-child(7) { 95 | -webkit-transform: scale3d(1, 1, 1) translate3d(-160px, 0, 0); 96 | transform: scale3d(1, 1, 1) translate3d(-160px, 0, 0); 97 | } 98 | 99 | .menu.menu--open .menu__items li:nth-child(8) { 100 | -webkit-transform: scale3d(1, 1, 1) translate3d(-113.14px, -113.14px, 0); 101 | transform: scale3d(1, 1, 1) translate3d(-113.14px, -113.14px, 0); 102 | } 103 | 104 | .menu__items li a { 105 | display: block; 106 | background: #2E3535; 107 | color: #DA7071; 108 | border-radius: 50%; 109 | outline: none; 110 | overflow: hidden; 111 | -webkit-tap-highlight-color: rgba(0,0,0,0); 112 | -webkit-tap-highlight-color: transparent; /* For some Androids */ 113 | } 114 | 115 | .menu__items li a:hover, 116 | .menu__items li a:focus { 117 | background: #272c2c; 118 | color: #777; 119 | } 120 | 121 | .menu__items li a span { 122 | position: absolute; 123 | color: transparent; 124 | top: 100%; 125 | pointer-events: none; 126 | } 127 | 128 | .morph-shape { 129 | position: absolute; 130 | width: 100%; 131 | height: 100%; 132 | top: 0; 133 | left: 0; 134 | z-index: 100; 135 | } 136 | 137 | .morph-shape svg path { 138 | fill: #DA7071; 139 | -webkit-transition: fill 0.3s; 140 | transition: fill 0.3s; 141 | } 142 | 143 | .menu--open .morph-shape svg path { 144 | fill: #777; 145 | } 146 | 147 | @media screen and (max-width: 40em) { 148 | .menu__items { 149 | -webkit-transform: scale3d(0.8,0.8,1); 150 | transform: scale3d(0.8,0.8,1); 151 | } 152 | } -------------------------------------------------------------------------------- /css/sidebar.css: -------------------------------------------------------------------------------- 1 | .menu { 2 | position: fixed; 3 | width: 300px; 4 | top: 3em; 5 | bottom: 3em; 6 | left: 0; 7 | z-index: 100; 8 | overflow: hidden; 9 | -webkit-transform: translate3d(-150px, 0, 0); 10 | transform: translate3d(-150px, 0, 0); 11 | -webkit-transition: -webkit-transform 0.6s; 12 | transition: transform 0.6s; 13 | } 14 | 15 | .menu.menu--open { 16 | -webkit-transform: translate3d(0, 0, 0); 17 | transform: translate3d(0, 0, 0); 18 | } 19 | 20 | .main { 21 | -webkit-transition: opacity 0.6s; 22 | transition: opacity 0.6s; 23 | } 24 | 25 | .menu.menu--open + .main { 26 | opacity: 0.3; 27 | pointer-events: none; 28 | } 29 | 30 | .menu__inner { 31 | width: calc(100% + 25px); 32 | padding: 0 140px 2em 0; 33 | overflow-y: auto; 34 | height: 100%; 35 | position: relative; 36 | z-index: 100; 37 | } 38 | 39 | .menu ul { 40 | list-style: none; 41 | padding: 0; 42 | margin: 0; 43 | } 44 | 45 | .menu ul li { 46 | margin: 0 0 2em 0; 47 | -webkit-transform: translate3d(-150px, 0, 0); 48 | transform: translate3d(-150px, 0, 0); 49 | -webkit-transition: -webkit-transform 0.6s; 50 | transition: transform 0.6s; 51 | } 52 | 53 | .menu.menu--anim ul li { 54 | -webkit-transform: translate3d(0, 0, 0); 55 | transform: translate3d(0, 0, 0); 56 | } 57 | 58 | .menu ul li:first-child { 59 | -webkit-transition-delay: 0.3s; 60 | transition-delay: 0.3s; 61 | } 62 | 63 | .menu ul li:nth-child(2) { 64 | -webkit-transition-delay: 0.2s; 65 | transition-delay: 0.2s; 66 | } 67 | 68 | .menu ul li:nth-child(3) { 69 | -webkit-transition-delay: 0.1s; 70 | transition-delay: 0.1s; 71 | } 72 | 73 | .menu ul li a { 74 | display: block; 75 | outline: none; 76 | } 77 | 78 | .menu ul li .fa { 79 | font-size: 2.5em; 80 | display: block; 81 | margin: 0 auto; 82 | color: #5f656f; 83 | } 84 | 85 | .menu ul li span { 86 | font-weight: bold; 87 | font-size: 0.75em; 88 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 89 | } 90 | 91 | .menu__handle { 92 | background: #2f3238; 93 | border: none; 94 | width: 30px; 95 | height: 24px; 96 | padding: 0; 97 | outline: none; 98 | position: absolute; 99 | top: 3px; 100 | right: 70px; 101 | z-index: 2000; 102 | } 103 | 104 | .menu__handle::before, 105 | .menu__handle::after, 106 | .menu__handle span { 107 | background: #5f656f; 108 | } 109 | 110 | .menu__handle::before, 111 | .menu__handle::after { 112 | content: ''; 113 | position: absolute; 114 | height: 2px; 115 | width: 100%; 116 | left: 0; 117 | top: 50%; 118 | -webkit-transform-origin: 50% 50%; 119 | transform-origin: 50% 50%; 120 | -webkit-transition: -webkit-transform 0.25s; 121 | transition: transform 0.25s; 122 | } 123 | 124 | .menu__handle span { 125 | position: absolute; 126 | width: 100%; 127 | height: 2px; 128 | left: 0; 129 | overflow: hidden; 130 | text-indent: 200%; 131 | -webkit-transition: opacity 0.25s; 132 | transition: opacity 0.25s; 133 | } 134 | 135 | .menu__handle::before { 136 | -webkit-transform: translate3d(0, -10px, 0); 137 | transform: translate3d(0, -10px, 0); 138 | } 139 | 140 | .menu__handle::after { 141 | -webkit-transform: translate3d(0, 10px, 0); 142 | transform: translate3d(0, 10px, 0); 143 | } 144 | 145 | .menu--open .menu__handle span { 146 | opacity: 0; 147 | } 148 | 149 | .menu--open .menu__handle::before { 150 | -webkit-transform: rotate3d(0, 0, 1, 45deg); 151 | transform: rotate3d(0, 0, 1, 45deg); 152 | } 153 | 154 | .menu--open .menu__handle::after { 155 | -webkit-transform: rotate3d(0, 0, 1, -45deg); 156 | transform: rotate3d(0, 0, 1, -45deg); 157 | } 158 | 159 | .morph-shape { 160 | position: absolute; 161 | width: 240px; 162 | height: 100%; 163 | top: 0; 164 | right: 0; 165 | } 166 | 167 | .morph-shape svg path { 168 | stroke: #5f656f; 169 | stroke-width: 5px; 170 | } 171 | 172 | @media screen and (max-width: 63em) { 173 | .main { 174 | padding: 0 2em; 175 | -webkit-transition: opacity 0.6s; 176 | transition: opacity 0.6s; 177 | } 178 | 179 | .menu { 180 | -webkit-transform: translate3d(-170px, 0, 0); 181 | transform: translate3d(-170px, 0, 0); 182 | } 183 | 184 | .menu.menu--open + .main { 185 | opacity: 0.05; 186 | } 187 | } -------------------------------------------------------------------------------- /css/demo.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Raleway:400,600,700); 2 | 3 | @font-face { 4 | font-weight: normal; 5 | font-style: normal; 6 | font-family: 'codropsicons'; 7 | src:url('../fonts/codropsicons/codropsicons.eot'); 8 | src:url('../fonts/codropsicons/codropsicons.eot?#iefix') format('embedded-opentype'), 9 | url('../fonts/codropsicons/codropsicons.woff') format('woff'), 10 | url('../fonts/codropsicons/codropsicons.ttf') format('truetype'), 11 | url('../fonts/codropsicons/codropsicons.svg#codropsicons') format('svg'); 12 | } 13 | 14 | *, *:after, *:before { -webkit-box-sizing: border-box; box-sizing: border-box; } 15 | .clearfix:before, .clearfix:after { content: ''; display: table; } 16 | .clearfix:after { clear: both; } 17 | 18 | body { 19 | color: #fff; 20 | background: #2f3238; 21 | font-weight: 400; 22 | font-size: 1em; 23 | font-family: 'Raleway', Arial, sans-serif; 24 | } 25 | 26 | a { 27 | color: #B24E51; 28 | text-decoration: none; 29 | } 30 | 31 | a:hover, 32 | a:focus { 33 | color: #afb3b8; 34 | outline: none; 35 | } 36 | 37 | .theme-2 { background: #434d55; } 38 | .theme-2 a { color: #4991C2; } 39 | .theme-2 a:hover, .theme-2 a:focus { color: #74777b; } 40 | 41 | .theme-3 { background: #e4eaea; color: #74777b;} 42 | .theme-3 a { color: #e35583; } 43 | .theme-3 a:hover, .theme-3 a:focus { color: #74777b; } 44 | 45 | .theme-4 a { color: #6EAE8C; } 46 | .theme-4 a:hover, .theme-4 a:focus { color: #74777b; } 47 | 48 | .theme-5 { background: #e4eaea; color: #74777b;} 49 | .theme-5 a { color: #EA8686; } 50 | .theme-5 a:hover, .theme-5 a:focus { color: #74777b; } 51 | 52 | .theme-6 a { color: #CFB75C; } 53 | .theme-6 a:hover, .theme-6 a:focus { color: #74777b; } 54 | 55 | .theme-7 { background: #E8E8E8; color: #FF72AD;} 56 | .theme-7 a { color: #415c71; } 57 | .theme-7 a:hover, .theme-7 a:focus { color: #509EDB; } 58 | 59 | .theme-8 a { color: #938edc; } 60 | 61 | .theme-9 { background: #3D4444; color: #DADADA;} 62 | .theme-9 a { color: #DA7071; } 63 | .theme-9 a:hover, .theme-9 a:focus { color: #74777b; } 64 | 65 | .content { 66 | min-height: 250px; 67 | margin: 0 auto; 68 | padding-bottom: 2em; 69 | } 70 | 71 | .content--tiny { 72 | max-width: 800px; 73 | } 74 | 75 | .container { 76 | text-align: center; 77 | padding: 5.25em 0.5em 0; 78 | } 79 | 80 | /* Header */ 81 | .codrops-header { 82 | padding: 0; 83 | letter-spacing: -1px; 84 | } 85 | 86 | .codrops-header h1 { 87 | font-weight: 800; 88 | font-size: 3.5em; 89 | line-height: 1; 90 | margin: 0; 91 | } 92 | 93 | .codrops-header h1 span { 94 | display: block; 95 | font-size: 35%; 96 | letter-spacing: 1px; 97 | padding-top: 0.75em; 98 | color: #afb3b8; 99 | } 100 | 101 | /* To Navigation Style */ 102 | .codrops-links { 103 | text-transform: uppercase; 104 | font-weight: 300; 105 | font-size: 1.25em; 106 | } 107 | 108 | .codrops-links a { 109 | display: inline-block; 110 | padding: 0.5em 0; 111 | margin: 0.5em; 112 | text-decoration: none; 113 | letter-spacing: 1px; 114 | } 115 | 116 | .codrops-icon span { 117 | display: none; 118 | } 119 | 120 | .codrops-icon:before { 121 | margin: 0 4px; 122 | text-transform: none; 123 | font-weight: normal; 124 | font-style: normal; 125 | font-variant: normal; 126 | font-family: 'codropsicons'; 127 | line-height: 1; 128 | speak: none; 129 | -webkit-font-smoothing: antialiased; 130 | } 131 | 132 | .codrops-icon-drop:before { 133 | content: "\e001"; 134 | } 135 | 136 | .codrops-icon-prev:before { 137 | content: "\e004"; 138 | } 139 | 140 | /* Codrops demo links */ 141 | .codrops-demos { 142 | margin: 3em auto; 143 | max-width: 700px; 144 | } 145 | 146 | .codrops-demos a { 147 | font-weight: 700; 148 | text-transform: uppercase; 149 | letter-spacing: 1px; 150 | padding: 0.25em 0; 151 | margin: 5px 10px; 152 | display: inline-block; 153 | font-size: 0.85em; 154 | } 155 | 156 | .codrops-demos a.current-demo { 157 | opacity: 0.5; 158 | } 159 | 160 | /* Related demos */ 161 | .related { 162 | text-align: center; 163 | padding: 10em 0; 164 | clear: both; 165 | font-weight: bold; 166 | } 167 | 168 | .related > a { 169 | width: 200px; 170 | display: inline-block; 171 | text-align: center; 172 | margin: 1em; 173 | font-size: 0.8em; 174 | vertical-align: top; 175 | } 176 | 177 | .related a img { 178 | max-width: 100%; 179 | opacity: 0.8; 180 | } 181 | 182 | .related a:hover img, 183 | .related a:active img { 184 | opacity: 1; 185 | } 186 | 187 | .related a h3 { 188 | margin: 0; 189 | font-size: ; 190 | padding: 0.5em 0 0.3em; 191 | max-width: 200px; 192 | text-align: left; 193 | } 194 | 195 | @media screen and (max-width: 30em) { 196 | .codrops-header h1 { 197 | font-size: 3em; 198 | } 199 | } 200 | -------------------------------------------------------------------------------- /pullupmenu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |