Skip to content

Commit

Permalink
Merge pull request #19 from rumenpetrov/challange-3/gdespolov
Browse files Browse the repository at this point in the history
challenge 3 - gdespolov
  • Loading branch information
rumenpetrov authored May 16, 2024
2 parents 7c49571 + 23507ca commit 66f5c03
Showing 1 changed file with 165 additions and 9 deletions.
174 changes: 165 additions & 9 deletions public/challenge-contributions/3/gdespolov.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,167 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Challenge 3</title>
</head>
<body>
<h1>This is the template HTML file for this challenge.</h1>
</body>
</html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Challenge 3 - GD</title>
<style>
:root {
font-family: Arial;
}
p {
margin: 0;
}
h2 {
margin: 0;
}
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
}
.cardContainer {
width: 300px;
height: 400px;
perspective: 1000px;
cursor: pointer;
}
.cardContent {
width: 100%;
height: 100%;
transition: transform 0.6s;
transform-style: preserve-3d;
}
.cardContainer:hover .cardContent {
transform: rotateY(180deg);
}
.cardContainer:nth-child(2):hover .cardContent {
transform: rotateY(-900deg);
}
.cardContainer:nth-child(3):hover .cardContent {
transform: rotateY(-180deg);
}
.cardSide {
width: 100%;
height: 100%;
border-radius: 8px;
top: 0;
left: 0;
position: absolute;
backface-visibility: hidden;
}
.cardSideBack {
transform: rotateY(180deg);
}
.cardSidePerspective {
transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
transform-style: preserve-3d;
}
.textContainer {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
width: 100%;
height: 100%;
}
.textContainerPerspective {
transform: translateZ(65px) scale(0.94);
}
.greenFront {
background-size: cover;
background-image: linear-gradient(to bottom, #f5f6fc80, #d1ffbd),
url("https://images.unsplash.com/photo-1571306603861-20c055ab2e5c?q=80&w=1935&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
}
.greenBack {
background-size: cover;
background-image: url("https://images.unsplash.com/photo-1571306603861-20c055ab2e5c?q=80&w=1935&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
color: white;
font-weight: 800;
}
.redFront {
background-size: cover;
background-image: linear-gradient(to bottom, #f5f6fc80, #ff7f7f),
url("https://images.unsplash.com/photo-1715314945142-2980c03c93be?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
}
.redBack {
background-size: cover;
background-image: url("https://images.unsplash.com/photo-1715314945142-2980c03c93be?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
color: white;
font-weight: 800;
}
.blueFront {
background-size: cover;
background-image: linear-gradient(to bottom, #f5f6fc80, #add8e6),
url("https://images.unsplash.com/photo-1715320555601-75fe531bfefe?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
}
.blueBack {
background-size: cover;
background-image: url("https://images.unsplash.com/photo-1715320555601-75fe531bfefe?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
font-weight: 800;
}
</style>
</head>

<body>
<div class="container">
<div class="cardContainer">
<div class="cardContent">
<div class="cardSide redFront">
<div class="textContainer">
<h2>Card 1 Front</h2>
</div>
</div>

<div class="cardSide cardSideBack redBack">
<div class="textContainer">
<h2>Card 1 Back</h2>
<p>Additional information here</p>
</div>
</div>
</div>
</div>

<div class="cardContainer">
<div class="cardContent">
<div class="cardSide greenFront">
<div class="textContainer">
<h2>Card 2 Front</h2>
</div>
</div>

<div class="cardSide cardSideBack greenBack">
<div class="textContainer">
<h2>Card 2 Back</h2>
<p>Additional information here</p>
</div>
</div>
</div>
</div>

<div class="cardContainer">
<div class="cardContent">
<div class="cardSide cardSidePerspective blueFront">
<div class="textContainer textContainerPerspective">
<h2>Card 3 Front</h2>
</div>
</div>

<div class="cardSide cardSideBack cardSidePerspective blueBack">
<div class="textContainer textContainerPerspective">
<h2>Card 3 Back</h2>
<p>Additional information here</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

0 comments on commit 66f5c03

Please sign in to comment.