JSFiddle - React, Tailwind, and code Playground
by franknstayn
HTML
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<section class="team">
<button class="btn btn-default">
add new
</button>
</section>
<!-- Team -->
<section class="team">
<div class="grid-xlarge">
<div class="team__container">
<article>
<a class="team__link" href="#" target="_blank">
<div class="team__img-container">
<span class="preloader"></span>
<figure class="team__img">
<img class="absolute-bg" src="http://www.webcoderskull.com/img/team1.png" alt=""/>
</figure>
</div>
<div class="team__text">
<h3 class="team__title">Thomas Vaeth</h3>
<span class="team__position">Web Developer</span>
</div>
</a>
</article>
<article>
<a class="team__link" href="#" target="_blank">
<div class="team__img-container">
<span class="preloader"></span>
<figure class="team__img">
<img class="absolute-bg" src="http://www.webcoderskull.com/img/team1.png" alt=""/>
</figure>
</div>
<div class="team__text">
<h3 class="team__title">Thomas Vaeth</h3>
<span class="team__position">Web Developer</span>
</div>
</a>
</article>
<article>
<a class="team__link" href="#" target="_blank">
<div class="team__img-container">
<span class="preloader"></span>
<figure class="team__img">
<img class="absolute-bg" src="http://www.webcoderskull.com/img/team1.png" alt=""/>
</figure>
</div>
<div class="team__text">
...
CSS
*,
*:before,
*:after {
box-sizing: border-box;
}
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
font-family: "Karla", sans-serif;
font-size: 100%;
background-color: #f8f8f8;
}
h3 {
margin-top: 0;
margin-bottom: 0.25em;
font-size: 1.25em;
line-height: 1.1;
}
@media (min-width: 91em) {
h3 {
font-size: 1.5em;
}
}
a {
text-decoration: none;
}
img,
figure {
max-width: 100%;
height: auto;
}
figure {
margin: 0;
}
.grid-xlarge {
margin-right: auto;
margin-left: auto;
}
@media (min-width: 54em) {
.grid-xlarge {
width: 95%;
}
}
@media (min-width: 91em) {
.grid-xlarge {
width: 80%;
}
}
.absolute-bg {
position: absolute;
top: 0;
left: 0;
z-index: 0;
height: 100%;
width: 100%;
background-position: 50%;
background-repeat: no-repeat;
background-size: cover;
overflow: hidden;
}
.preloader {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 3em;
width: 3em;
margin: auto;
border: 2px solid transparent;
border-top-color: #47bec7;
border-radius: 50%;
opacity: 1;
-webkit-animation: spin 1s linear infinite both;
animation: spin 1s linear infinite both;
transition: opacity 2s 0.2s ease-out;
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes spin {
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
to {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.team {
width: 100%;
padding-right: 1em;
padding-left: 1em;
}
.team__container {
display: flex;
flex-direction: row;
flex-flow: wrap;
margin-left: -1em;
margin-right: -1em;
align-items: center;
justify-content: center;
}
.team__container > * {
padding: 1em;
flex-basis: 100%;
max-width: 100%;
}
@media...
JavaScript
$( ".container" ).prepend( $( "h2" ) );