JSFiddle - React, Tailwind, and code Playground
Box Pop-Ups
by Jennifer Perrin
HTML
<div class="module" onclick="">
<a href="#" class="pop-up-link">View Demo</a>
</div>
<div class="module" onclick="">
<a href="#" class="pop-up-link">View Demo</a>
</div>
CSS
body {
-webkit-transform: translateZ(0);
font: italic medium Georgia;
}
h1 {
font-weight: normal;
margin: 0;
font-size: 1em;
padding: 20px;
}
.module {
background: #eee;
width: 200px;
height: 200px;
float: left;
margin: 80px;
position: relative;
}
.module:hover .pop-up-link, .module:active .pop-up-link {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
.module:hover .pop-up-link:hover, .module:hover .pop-up-link:active, .module:active .pop-up-link:hover, .module:active .pop-up-link:active {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1);
}
.pop-up-link {
position: absolute;
top: 0;
right: 0;
width: 120px;
height: 120px;
line-height: 120px;
margin-top: -60px;
margin-right: -60px;
text-align: center;
background: #099;
border-radius: 50%;
color: white;
text-decoration: none;
opacity: 0;
-webkit-transform: scale(0.7);
-moz-transform: scale(0.7);
-ms-transform: scale(0.7);
-o-transform: scale(0.7);
transform: scale(0.7);
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
-o-transition: 0.2s;
transition: 0.2s;
}