Repository: codrops/FancyLetterAnimation Branch: master Commit: b30550d99313 Files: 8 Total size: 45.8 KB Directory structure: gitextract_hi0y6p12/ ├── .gitignore ├── README.md ├── css/ │ ├── component.css │ ├── demo.css │ ├── normalize.css │ └── sponsor.css ├── index.html └── js/ └── main.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ *.DS_Store ================================================ FILE: README.md ================================================ # Fancy SVG Letter Animation ![Fancy SVG Letter Animation](http://tympanus.net/codrops/wp-content/uploads/2016/09/FancySVGLetterAnimation_800x600.jpg) An experimental SVG letter animation inspired by the Dribbble shot ["Shading Letters in Illustrator"](https://dribbble.com/shots/2943049-Shading-Letters-in-Illustrator) by Jake Bartlett's. Powered by Julian Garnier's [anime.js](http://anime-js.com/). [Article on Codrops](http://tympanus.net/codrops/?p=27976) [Demo](https://tympanus.net/Development/FancyLetterAnimation/) This demo is sponsored by [Mighty Deals: Amazing Font Deals](https://goo.gl/9YANfs). ## License Integrate or build upon it for free in your personal or commercial projects. Don't republish, redistribute or sell "as-is". Read more here: [License](http://tympanus.net/codrops/licensing/) ## Credits - Animations powered by [anime.js](http://anime-js.com/) by Julian Garnier ## Misc Follow Codrops: [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/) [© Codrops 2016](http://www.codrops.com) ================================================ FILE: css/component.css ================================================ /* Main SVG */ .letters { position: relative; display: block; min-height: 400px; max-height: 70vh; margin: 0 auto; } /* Letter path */ .letter__layer { fill: none; stroke-miterlimit: 3; stroke-linecap: butt; stroke-linejoin: bevel; } /* Individual effects/styles */ /* Effect 1 */ .letters--effect-1 .letter__layer:first-child { stroke-width: 9px; } .letters--effect-1 .letter__layer:nth-child(2) { stroke-width: 9.5px; } .letters--effect-1 .letter__layer:nth-child(3) { stroke-width: 10px; } /* Effect 1 colors */ .color-1 { stroke: #dea521; } .color-2 { stroke: #f84242; } .color-3 { stroke: #3758a7; } .color-4 { stroke: #f79c8c; } .color-5 { stroke: #84b5bd; } .color-6 { stroke: #feefde; } /* Effect 2 */ .letters--effect-2 .letter__layer:first-child { stroke: #4caf50; stroke-width: 1px; } .letters--effect-2 .letter__layer:nth-child(2) { stroke: #ffeb3b; stroke-width: 4px; } .letters--effect-2 .letter__layer:nth-child(3) { stroke: #e6437b; stroke-width: 10px; } /* Effect 3 */ .letters--effect-3 .letter__layer:first-child { -webkit-transform: translate3d(-2px, -2px, 0); transform: translate3d(-2px, -2px, 0); stroke: #dddde6; stroke-width: 10px; } .letters--effect-3 .letter__layer:nth-child(2) { stroke: #eca80e; stroke-width: 6px; } .letters--effect-3 .letter__layer:nth-child(3) { stroke: #607d8b; stroke-width: 8px; } /* Effect 4 */ .letters--effect-4 .letter__layer:first-child { stroke: #00966c; stroke-width: 10px; } .letters--effect-4 .letter__layer:nth-child(2) { stroke: #27272d; stroke-width: 4px; } .letters--effect-4 .letter__layer:nth-child(3) { stroke: #fcec9b; stroke-width: 1px; } ================================================ FILE: css/demo.css ================================================ *, *::after, *::before { -webkit-box-sizing: border-box; box-sizing: border-box; } body { font-family: 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #fff; background: #27272d; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } a { outline: none; color: #fdf7b5; text-decoration: none; } a:hover, a:focus { color: #fff; } .hidden { position: absolute; overflow: hidden; width: 0; height: 0; pointer-events: none; } /* Icons */ .icon { display: block; width: 1.5em; height: 1.5em; margin: 0 auto; fill: currentColor; } /* Buttons */ .btn { display: block; margin: 0; padding: 0; cursor: pointer; pointer-events: auto; color: #fdf7b5; border: none; background: none; } .btn:focus { outline: none; } .btn:hover { color: #fff; } .btn--start { border: 2px solid; border-radius: 1.85em; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; font-size: 0.95em; padding: 1em 2em; margin: 0 auto; -webkit-transition: color 0.2s; transition: color 0.2s; } .btn--github { position: absolute; right: 1em; top: 0.75em; font-size: 1.5em; margin: 0.15em 0 0 0; } .btn--github .icon { stroke: #fdf7b5; fill: none; } .btn--github:hover .icon, .btn--github:focus .icon { stroke: #fff; } /* Codrops header */ .codrops-header { display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-align-items: center; -ms-flex-align: center; align-items: center; padding: 1.25em 2em 3em 1.25em; position: relative; } .codrops-header__title { font-size: 1.15em; font-weight: 500; margin: 0; padding: 0 0.75em; } .codrops-header__tagline { font-size: 0.85em; margin: 0 0 0 1em; max-width: 505px; text-align: left; font-weight: 600; padding: 0 4.75em 0 2em; position: relative; border-left: 1px solid rgba(255,255,255,0.3); } /* Top Navigation Style */ .codrops-links { position: relative; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; text-align: center; white-space: nowrap; } .codrops-links::after { content: ''; position: absolute; top: 10%; left: 50%; width: 1px; height: 80%; opacity: 0.2; background: currentColor; -webkit-transform: rotate3d(0, 0, 1, 22.5deg); transform: rotate3d(0, 0, 1, 22.5deg); } .codrops-icon { display: inline-block; margin: 0.25em; padding: 0.25em; } /* Content */ .content { position: relative; max-height: 85vh; min-height: 300px; margin: 0 auto 5em; } .content__meta { position: relative; text-align: center; } /* Related demos */ .content--related { text-align: center; font-weight: bold; padding: 7em 0 12em; margin: 10em 0 0 0; background: #1c1c21; position: relative; z-index: 1000; max-height: none; } .media-item { display: inline-block; padding: 1em; vertical-align: top; -webkit-transition: color 0.3s; transition: color 0.3s; } .media-item__img { max-width: 100%; opacity: 0.5; -webkit-transition: opacity 0.3s; transition: opacity 0.3s; } .media-item:hover .media-item__img, .media-item:focus .media-item__img { opacity: 1; } .media-item__title { margin: 0; padding: 0.5em; font-size: 1em; } @media screen and (max-width: 50em) { .codrops-header { -webkit-flex-wrap: wrap; flex-wrap: wrap; padding: 1em 3em 0 1em; } .codrops-header__title { -webkit-flex: none; flex: none; width: 100%; padding: 0.25em 0 0 0; } .codrops-header__tagline { padding: 1em 0 0 0; border: none; margin: 0; } } ================================================ FILE: css/normalize.css ================================================ 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;} ================================================ FILE: css/sponsor.css ================================================ /* Sponsor */ .pater { display: block; position: fixed; width: 100%; right: 0; bottom: 0; } .pater::before { content: 'Sponsor:'; position: absolute; color: #000; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; font-size: 0.5em; top: 0.75em; left: 0.75em; opacity: 0.4; } .pater__img { display: none; } .pater__title { display: block; background: #fdf7b5; color: #333; text-align: left; padding: 2em 1em 1em; font-size: 1em; margin: 0; } .pater__title span { color: #f84242; } @media screen and (min-width: 50em) { .pater { width: 280px; height: 258px; } .pater::before { left: 6em; top: 6em; } .pater__img { display: block; width: 100%; position: absolute; bottom: 0; left: 0; opacity: 0.5; -webkit-transform: translate3d(50px,50px,0); transform: translate3d(50px,50px,0); -webkit-transition: -webkit-transform 0.5s, opacity 0.5s; transition: transform 0.5s, opacity 0.5s; -webkit-transition-timing-function: cubic-bezier(0.7,0,0.3,1); transition-timing-function: cubic-bezier(0.7,0,0.3,1); } .pater:hover .pater__img { opacity: 1; -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } .pater__title { position: absolute; width: 100%; bottom: 0; right: 0; font-size: 0.85em; padding: 1.25em 50px 1em 1.5em; -webkit-transform: translate3d(105px,-20px,0); transform: translate3d(105px,-20px,0); -webkit-transition: -webkit-transform 0.5s; transition: transform 0.5s; -webkit-transition-timing-function: cubic-bezier(0.7,0,0.3,1); transition-timing-function: cubic-bezier(0.7,0,0.3,1); } .pater:hover .pater__title { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } } ================================================ FILE: index.html ================================================ Fancy SVG Letter Animation | Codrops

Fancy SVG Letter Animation

A fun letter animation inspired by Jake Bartlett's Dribbble shot "Shading Letters in Illustrator" for Jamie Bartlett's Skillshare class.

Font Deals by Mighty Deals

Amazing Font Deals!
Up to 95% off!

================================================ FILE: js/main.js ================================================ /** * main.js * http://www.codrops.com * * Licensed under the MIT license. * http://www.opensource.org/licenses/mit-license.php * * Copyright 2016, Codrops * http://www.codrops.com */ ;(function(window) { 'use strict'; // Helper vars and functions. function extend( a, b ) { for( var key in b ) { if( b.hasOwnProperty( key ) ) { a[key] = b[key]; } } return a; } // Concatenate JS objs. // From http://stackoverflow.com/a/2454315. function collect() { var ret = {}; var len = arguments.length; for (var i=0; i