JSFiddle - React, Tailwind, and code Playground
by Dogbert
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/particles.js/2.0.0/particles.min.js"></script>
<script src="https://rawgit.com/lcdsantos/jquery-drawsvg/master/public/jquery.drawsvg.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:100,400,700">
<div id="typed">
<span class="inner"></span>
</div>
<div id="typed-after" style="display: none;">Direct and thoughtful messaging captures the essence of corporate communication and business writing. At WordPower we use the beauty and power of the written and spoken word to bring life and meaning to tell your story with the brevity, clarity, consistency,
coherence and relevance it deserves. Our core values of delivering excellence and value-adds to clients’ communication needs are the key drivers of our success. That’s the WordPower way of building enduring relationships with customers.</div>
<svg version="1.1" viewBox="0 0 139 139" style="display: none;" id="typed-replay"><path d="M91.257,42.679l-4.912,6.313c7.656,5.958,11.478,15.605,9.971,25.178c-2.281,14.502-15.941,24.448-30.436,22.162 c-14.501-2.284-24.443-15.939-22.164-30.44c1.105-7.025,4.88-13.199,10.628-17.384c4.78-3.481,10.452-5.232,16.264-5.091 l-4.263,4.473l3.848,3.671l8.188-8.596l0.002,0.003l3.668-3.852l-3.845-3.668l-0.002,0.001l-8.593-8.189l-3.671,3.852l4.509,4.295 c-7.442-0.11-14.689,2.174-20.813,6.634C42.159,47.485,37.25,55.514,35.813,64.65c-2.965,18.856,9.964,36.614,28.822,39.585 c1.815,0.286,3.618,0.424,5.401,0.424c16.737-0.001,31.501-12.201,34.182-29.245C106.178,62.967,101.211,50.424,91.257,42.679z"></path></svg>
<div id="particles"></div>
CSS
body {
font-size: 32px;
text-align: center;
margin: 40px 20px;
font-family: Raleway;
background: black;
}
#typed {
position: relative;
color: white;
}
.typed-cursor {
opacity: 1;
-webkit-animation: blink 0.7s infinite;
-moz-animation: blink 0.7s infinite;
animation: blink 0.7s infinite;
}
#typed-after {
font-size: 16px;
padding: 20px;
}
#typed-replay {
width: 80px;
height: 80px;
cursor: pointer;
}
#typed-replay path {
stroke: red;
stroke-width: 3px;
}
@keyframes blink {
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}
@-webkit-keyframes blink {
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}
@-moz-keyframes blink {
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}
#particles {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.sliding-borders {
position: relative;
}
.sliding-borders .top,
.sliding-borders .right,
.sliding-borders .bottom,
.sliding-borders .left {
position: absolute;
background: red;
transition: all 1s;
}
.sliding-borders .top {
left: 0;
top: 0;
height: 2px;
width: 0;
}
.sliding-borders .right {
right: 0;
top: 0;
width: 2px;
height: 0;
}
.sliding-borders .bottom {
right: 0;
bottom: 0;
height: 2px;
width: 0;
}
.sliding-borders .left {
left: 0;
bottom: 0;
width: 2px;
height: 0;
}
.sliding-borders.animate .top,
.sliding-borders.animate .bottom {
width: 100%;
}
.sliding-borders.animate .left,
.sliding-borders.animate .right {
height: 100%;
}
JavaScript
// The MIT License (MIT)
// Typed.js | Copyright (c) 2014 Matt Boldt | www.mattboldt.com
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
! function($) {
"use strict";
var Typed = function(el, options) {
// chosen element to manipulate text
this.el = $(el);
// options
this.options = $.extend({}, $.fn.typed.defaults, options);
// attribute to type into
this.isInput = this.el.is('input');
this.attr = this.options.attr;
// show cursor
this.showCursor = this.isInput ? false : this.options.showCursor;
// text content of element
this.elContent = this.attr ? this.el.attr(this.attr) : this.el.text()
// html or plain text
this.contentType = this.options.contentType;
// typing speed
this.typeSpeed = this.options.typeSpeed;
// add a delay before typing starts
this.startDelay = this.options.startDelay;
//...