Skip to content

Commit

Permalink
Merge pull request Aryamanz29#43 from KartikKode/master
Browse files Browse the repository at this point in the history
adding styled cards Aryamanz29#30
  • Loading branch information
Aryamanz29 authored Oct 7, 2021
2 parents 0c44711 + 44c8ad8 commit 321a632
Show file tree
Hide file tree
Showing 8 changed files with 679 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Styled Cards/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
Binary file added Styled Cards/DEMO images/one.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Styled Cards/DEMO images/three.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Styled Cards/DEMO images/two.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions Styled Cards/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
###Description
It is a styled card using html css and vanilla js
Cards Description
->Cards are visible when you hover over them
->Card shows tilt movement when you hover over them
->Cards have a glass effect ehuch looks really cool

###Demo Image are in the DEMO images folder
48 changes: 48 additions & 0 deletions Styled Cards/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="card">
<div class="content">
<h2>01</h2>
<h3>Card one</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae corporis ratione tempora non! Unde blanditiis ex possimus sequi molestias voluptates ad voluptate amet id facere veniam dolorum repudiandae explicabo aperiam, quibusdam saepe magni esse.</p>
<a href="#">Read More</a>
</div>
</div>
<div class="card">
<div class="content">
<h2>02</h2>
<h3>Card Two</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae corporis ratione tempora non! Unde blanditiis ex possimus sequi molestias voluptates ad voluptate amet id facere veniam dolorum repudiandae explicabo aperiam, quibusdam saepe magni esse.</p>
<a href="#">Read More</a>
</div>
</div>
<div class="card">
<div class="content">
<h2>03</h2>
<h3>Card Three</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae corporis ratione tempora non! Unde blanditiis ex possimus sequi molestias voluptates ad voluptate amet id facere veniam dolorum repudiandae explicabo aperiam, quibusdam saepe magni esse.</p>
<a href="#">Read More</a>
</div>
</div>
</div>

</body>
<script type="text/javascript" src="vanilla-tilt.js"></script>
<script>
VanillaTilt.init(document.querySelectorAll(".card"), {
max: 25,
speed: 400,
glare: true,
"max-glare": 1,
});
</script>
</html>
109 changes: 109 additions & 0 deletions Styled Cards/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
*{
margin: 0;
padding: 0;
font-family: sans-serif;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
/* align-content: center; */
align-items: center;
min-height: 100vh;
background: #161623;
}
body::before
{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(#f00,#f0f);
clip-path: circle(30% at right 70%);
}
body::after
{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(#2196f3,#e91e63);
clip-path: circle(20% at 10% 10%);
}
.container{
position: relative;
display: flex;
justify-content: center;
align-items: center;
max-width: 1200px;
flex-wrap: wrap;
z-index: 1;
}
.container .card
{
position: relative;
width: 280px;
height: 400px;
margin: 30px;
box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.5);
border-radius: 15px;
background: rgba(255,255, 255, 0.1) ;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
border-top: 1px solid rgba(255,255, 255, 0.5) ;
border-left: 1px solid rgba(255,255, 255, 0.5) ;
backdrop-filter: blur(5px);
}
.container .card .content
{
padding: 20px;
text-align: center;
transform: translateY(100px);
opacity: 0;
transition: 0.5s;
}
.container .card:hover .content
{
transform: translateY(0px);
opacity: 1;
}

.container .card .content h2
{
position: absolute;
top: -80px;
right: 30px;
font-size: 8em;
color: rgba(255,255, 255, 0.05) ;
}
.container .card .content h3
{
font-size: 1.5em ;
color: #fff;
z-index: 1;
}
.container .card .content p
{
font-size: 1em;
color: #fff;
font-weight: 300px;
}
.container .card .content a
{
position: relative;
display: inline-block;
padding: 8px 20px;
margin-top: 15px;
background: #fff;
color: #000;
border-radius: 20px;
text-decoration: none;
font-weight: 500;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
Loading

0 comments on commit 321a632

Please sign in to comment.