<div class="container">
<img src="https://live.staticflickr.com/65535/48705214177_b5ecb2add2_k.jpg" alt="background" />
<div class="card">
<div class="card-contents card-front"></div>
</div>
<div class="topLeft">Noroeste</div>
<div class="topCenter">NORTE</div>
<div class="topRight">Nordeste</div>
<div class="centerRight">ESTE</div>
<h2 class="center">Cardinal Points</h2>
<div class="centerLeft">OESTE</div>
<div class="bottomLeft">Suroeste</div>
<div class="bottomCenter">SUR</div>
<div class="bottomRight">Sureste</div>
</div>
<div id="square">
<h2>Disrupción Creativa</h2>
<h3>CómoCrearImagen.es</h3>
</div>
* {
box-sizing:border-box;
margin:0;
padding:0;
font-family: muli, sans-serif;
font-weight: 700;
font-style: italic;
}
.container {
position:relative;
font-size: 5vh;
color:#fff;
background: -moz-linear-gradient(top, #2196f3 0%, #9c27b0 100%);
background: -webkit-linear-gradient(top, #2196f3 0%,#9c27b0 100%);
background: linear-gradient(to bottom, #2196f3 0%,#9c27b0 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2196f3', endColorstr='#9c27b0',GradientType=0 );
}
.container img {
width: 100%;
height: 100vh;
object-fit: cover;
opacity: 0.5;
filter: blur(6px) grayscale(1);
-webkit-filter:blur(6px) grayscale(1);
}
.card {
position:absolute;
top: 50%;
left: 50%;
transform:translate(-50%,-50.4%);
width:80vw;
height:80vw;
max-width:83%;
transition:all 1s ease;
box-shadow: 1px 3px 5px rgba(0,0,0,.5);
}
.card:hover {
box-shadow:0 0 20px #fff;
cursor:pointer;
}
.card-contents {
width:100%;
height:100%;
display:flex;
justify-content:center;
align-content:center;
align-items:center;
flex-direction:column;
text-align:center;
position:absolute;
top:0;
left:0;
}
.card-front {
background-image: url(https://live.staticflickr.com/65535/48705214177_b5ecb2add2_k.jpg);
background-size:cover;
background-position:center;
transform-style:preserve-3d;
}
#square {
position: absolute;
padding: .5em 1em;
top: 50%;
left: 50%;
transform:translate(-50%,-50%);
width: 75vw;
height: 75vw;
border: 2px solid white;
color: white;
}
#square h2 {
position:absolute;
right: 1em;
bottom: .6em;
}
.topLeft {
position: absolute;
top: 1em;
left: 1em;
}
.topCenter {
position: absolute;
top: 1em;
left: 50%;
transform: translateX(-50%);
}
.topRight {
position: absolute;
top: 1em;
right: 1.2em;
}
.centerRight{
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 1.2em;
}
.center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.centerLeft {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 1.2em;
}
.bottomLeft {
position: absolute;
bottom: 1.2em;
left: 1em;
}
.bottomCenter {
position:absolute;
bottom: 1.2em;
left: 50%;
transform: translateX(-50%);
}
.bottomRight {
position: absolute;
bottom: 1.2em;
right: 1.2em;
}
@media screen and (orientation:landscape){
.card{
width:80vh;
height:80vh;
}
#square {
width: 75vh;
height: 75vh;
}
}
@media only screen and (max-width:500px){
h1{font-size:1.2rem}
h2{font-size:.9rem}
.container{font-size: 4vh}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.