This code provides a beautiful business card for you. In this business card, the user's photo is included along with a short text about the user as well as social networks related to the user. This business card becomes three-dimensional in hover mode and looks like the business card has been scaled up.


HTML
<!-- This script got from www.devanswer.com  -->
<div class="container">
  <div class="card">
    <div class="profileHeader">
      <div class="profilePic">
        <img src="http://www.devanswer.com/img/unknown-user.png" alt="profile pic">
      </div>
      <div class="name"><h1>Name and Family</h1></div>
    </div>
    <div class="profileDesc">
      <h3>21, Front-End Developer based in Italy</h3>
      <div class="contact">
        <a href="" id="insta"><img src="http://www.devanswer.com/img/instagram.png" alt="insta logo"></a>
        <a href="" id="facebook"><img src="http://www.devanswer.com/img/facebook.png" alt="facebook logo"></a>
        <a href="" id="twitter"><img src="http://www.devanswer.com/img/twitter.png" alt="twitter logo"></a>
        <a href="" id="linkedin"><img src="http://www.devanswer.com/codes/files/linkedIn-logo.webp" alt="linkedin logo"></a>
      </div>
    </div>
  </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com ">Developers Answer</a></div>
                        

CSS
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;600&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    scrollbar-width: none;
}
::-webkit-scrollbar {
    display: none;
}
body {
    min-height: 100vh;
    display: grid;
    perspective: 1000px;
    background: #444;
}
.container {
    width: 70vw;
    place-self: center;
    display: grid;
    min-width: 400px;
}
.card {
    transform-style: preserve-3d;
    width: 70%;
    height: 80%;
    place-self: center;
    background: -webkit-linear-gradient(45deg,#2af, #a2f);
    border-radius: 30px;
    box-shadow: 0px 15px 20px #0009;
}
.profileHeader {
    height: 60%;
    display: flex;
    align-items: center;
    flex-direction: column;
}
.profilePic {
    display: flex;
    align-items: center;
    justify-content: center;
    background: -webkit-linear-gradient(45deg,#0000 10%,white);
    width: 15rem;
    border-radius: 50%;
    height: 15rem;
    margin: 1rem 0;
}
.profilePic img {
    width: 65%;
}
.profileDesc {
    padding: 0 2rem;
}
.profileDesc h3 {
    color: #222;
    text-align: center;
    margin: 1.2rem 0;
    font-weight: 300;
    font-size: 1.1em;
}
.name h1 {
    font-size: 2em;
}

a {
    display: grid;
}
.contact {
    display: flex;
    justify-content: space-between;
    height: 20vh;
}
.contact img {
    width: 3rem;
    border-radius: 10px;
    place-self: center;
}
.profilePic img, .name h1, .profileDesc h3, .contact {
    transition: all 0.5s ease-out;
}
Javascript
var container = document.querySelector(".container");
var card = document.querySelector(".card");
var profilePic = document.querySelector(".profilePic img");
var desc = document.querySelector(".profileDesc h3");
var social = document.querySelector(".contact");
let off = 15;
container.addEventListener("mousemove", function (e) {
    let x = (window.innerWidth / 2 - e.pageX) / off;
    let y = (window.innerHeight / 2 - e.pageY) / off;
    card.style.transform = 'rotateX(' + y + 'deg) ' + 'rotateY(' + x + 'deg)';
});
container.addEventListener("mouseenter", function (e) {
    card.style.transition = "none";
    profilePic.style.transform = 'translateZ(150px)';
    document.querySelector(".name h1").style.transform = 'translateZ(120px)';
    desc.style.transform = 'translateZ(100px)';
    social.style.transform = 'translateZ(80px)';
});
container.addEventListener("mouseleave", function (e) {
    card.style.transition = "all 0.5s ease";
    card.style.transform = 'rotateX(0deg) rotateY(0deg)';
    profilePic.style.transform = 'translateZ(0px)';
    document.querySelector(".name h1").style.transform = 'translateZ(0px)';
    desc.style.transform = 'translateZ(0px)';
    social.style.transform = 'translateZ(0px)';
});