How to create glassmorphism profile card using HTML & CSS

Hello friends, today we will be going to create a Glassmorphism Profile Card using HTML & CSS. I have posted many videos and articles before related to the JavaScript project, now this the something new that we are going to build.

Video Tutorial of How to create a Glassmorphism Profile Card using HTML & CSS


As you have seen on the given video tutorial of Glassmorphism Profile Card using HTML & CSS, 

If you are feeling bored watching the given video tutorial of Glassmorphism Profile Card using HTML & CSS then you can copy or download the given codes below:


Glassmorphism Profile Card using HTML & CSS | Free Source Code

To create this program (Glassmorphism Profile Card). First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste the following codes in your file.

In the first place, make a HTML document with the name of index.html and glue the given codes in your HTML record. Keep in mind, you've to make a document with .html extension.
<!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" />
  <link rel="stylesheet" href="./style.css" />
  <script src="https://unpkg.com/phosphor-icons"></script>
  <link rel="preconnect" href="https://fonts.googleapis.com" />
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  <link
    href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@100;200;300;400;500;600;700;800;900&display=swap"
    rel="stylesheet" />
  <title>Profile Card</title>
  <!-- S-Tech04 -->
</head>

<body>
  <div class="card">
    <div class="imgBx">
      <img src="./img.jpg" alt="" />
    </div>
    <h2 class="profile-name">James Ford</h2>
    <small class="user-handle">@james_ford</small>
    <div class="profile-actions">
      <button class="btn btn-primary">Follow</button>
      <button class="btn btn-icon">
        <i class="ph-export"></i>
      </button>
      <button class="btn btn-icon">
        <i class="ph-dots-three-outline-fill"></i>
      </button>
    </div>
  </div>
</body>
</html>
Second, make a CSS record with the name of style.css and glue the given codes in your CSS document. Keep in mind, you've to make a record with .css extension.
*
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Be Vietnam Pro", sans-serif;
}
body
{
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url(./background.png) no-repeat center center fixed;
    background-size: cover;
    position: relative;
    overflow: hidden;
}
.card
{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 90%;
    max-width: 300px;
    position: relative;
    background-color: rgba(255, 255, 255, 0.03);
    border: 4px solid rgba(255, 255, 255, 0.2);
    padding: 4rem 3rem;
    color: #f1f3f3;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    box-shadow: 22px 22px 50px rgba(0, 0, 0, 0.1),
    -22px -22px 50px rgba(0, 0, 0, 0.1);
    z-index: 2;
}
.card .imgBx 
{
    width: 175px;
    height: 175px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.3);
}
.card .imgBx img
{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    object-fit: cover;
    width: 100%;
}
.card .profile-name
{
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
}
.card .profile-actions
{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}
.card .profile-actions > *
{
    margin: 0 0.25rem;
}
.btn
{
    background-color: transparent;
    height: 46px;
    border: 0;
    cursor: pointer;
    line-height: 1;
    transition: 0.15s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn-primary
{
    background-image: linear-gradient(135deg, #5587ff, #3772ff);
    padding: 0 1.375rem;
    border-radius: 99em;
    color: #fff;
    font-size: inherit;
}
.btn-icon
{
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}
.btn-icon i
{
    font-size: 1.25em;
}
.btn-icon:hover
{
    border: 3px solid #ffffff;
}
That's all, now you've successfully created a program Glassmorphism Profile Card using HTML & CSS. If your code doesn't work or you've faced any error/problem, please download the source code files from the given download button. It's free and a .zip file will be downloaded then you've to extract it.
Click on the following download button to download all source code files.


Download Now
Please Wait...
Direct Link click here.

How can I help you

Post a Comment

How can I help you

Post a Comment (0)

Previous Post Next Post