TITLE : Glassmorphism UI | Glassmorphism Tutorial | New UI Trend
HTML :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="main.css">
<title>Glassmorphism</title>
</head>
<body>
<div class="card">
<div class="header">
<p>Bank</p>
<p>Platinum</p>
</div>
<div class="middle">
<img src="Images/chip.png" alt="#">
<p>1234 3056 9516 8541</p>
</div>
<div class="footer">
<img src="Images/visa.png" alt="#">
</div>
</div>
</body>
</html>
CSS :
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: josefin sans;
color:#fff;
}
body {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: url('Images/bg.jpg');
background-size: cover;
}
.card {
width: 40%;
height: 50%;
background: rgba(255, 255, 255, 0.2);
border-radius: 15px;
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column;
backdrop-filter: blur(15px);
box-shadow: 10px 10px 50px 0 rgba(0, 0, 0, 0.3),
-10px -10px 50px 0 rgba(255, 255, 255, 0.3);
}
.card .header {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 30px 25px;
font-size: 3rem;
}
.card .header p:last-child {
font-size: 1.8rem;
}
.card .middle {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 50px;
}
.card .middle img {
width: 100px;
}
.card .middle p{
font-size: 2.5rem;
}
.card .footer {
width: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 30px 25px;
}
.card .footer img{
width: 100px;
}