JSFiddle - React, Tailwind, and code Playground
by Ishank Dubey
HTML
<link rel="stylesheet" href="http://daneden.github.io/animate.css/animate.min.css">
<span id="abhiruchi-noticeboard" style="display:block;">
<h1 class="site__title">Devranjani One Liner Devranjani One Liner</h1>
<h2 class="beta subhead"><a href="http://www.google.com">Jaipur</a></h2>
</span>
<button class="butt js--triggerAnimation">Animate it</button>
CSS
h1, .alpha {
margin-bottom: 1.5rem;
font-size: 2rem;
font-weight: 100;
line-height: 1;
letter-spacing:-.07em;
}
@media (min-width: 650px) {
.mega {
font-size: 6rem;
line-height: 1;
}
}
.subhead, .meta {
color: #7b8993;
}
.promo {
text-align: center;
}
p, hr, form {
margin-bottom: 1.5rem;
}
hr {
border: none;
margin-top: -1px;
height: 1px;
background-color: #c0c8c9;
background-image: -webkit-linear-gradient(0deg, #fff, #c0c8c9, #fff);
}
a {
color: inherit;
text-decoration: underline;
-webkit-animation: hue 60s infinite linear;
}
a:hover {
color: #f35626;
}
/*-----------------------------------*\
$LAYOUT
\*-----------------------------------*/
.wrap {
max-width: 38rem;
margin: 0 auto;
}
.island {
padding: 1.5rem;
}
.isle {
padding: .75rem;
}
.spit {
padding: .375rem;
}
/*-----------------------------------*\
$BASE
\*-----------------------------------*/
html {
font: 100%/1.5 "Roboto", Verdana, sans-serif;
color: #3d464d;
background-color: #fff;
-webkit-font-smoothing: antialiased;
width: 100%;
overflow: hidden-x;
/* Centering in The Unknown */
text-align: center;
}
@media (min-width: 650px) {
html {
height: 100%;
}
html:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -0.25em;
}
body {
display: inline-block;
vertical-align: middle;
max-width: 38rem;
}
}
/*-----------------------------------*\
$HEADER
\*-----------------------------------*/
.site__header {
-webkit-animation: bounceInUp 1s;
}
.site__title {
color: #f35626;
background-image: -webkit-linear-gradient(92deg,#f35626,#feab3a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: hue 60s infinite linear;
}
.site__content {
-webkit-animation: bounceInUp 1s;
-webkit-animation-delay: .1s;
}
.site__content form {
-webkit-animation:...
JavaScript
function testAnim(x) {
$('#abhiruchi-noticeboard').removeClass().addClass(x + ' animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
$(this).removeClass();
});
};
$(document).ready(function(){
$('.js--triggerAnimation').click(function(e){
e.preventDefault();
var anim = 'flipOutX';
testAnim(anim);
});
$('.js--animations').change(function(){
var anim = $(this).val();
testAnim(anim);
});
});