.cardicon { position: absolute; top: 0px; right: 0px; width: 60px; height: 60px; overflow: hidden; transition: ease-in-out 0.3s; border-radius: 10px; } .cardicon:hover { box-shadow: white 0 0 30px; transform: translateY(-2px); } .cardicon>img { width: 100%; height: 100%; } .card { position: absolute; top: 10px; right:10px; padding: 10px; border-radius: 10px; overflow: hidden; width: 60px; height: 60px; transition: 0.3s; background: linear-gradient(rgb(109, 107, 107), rgb(177, 175, 175)); } .card:hover { width: 300px; height: 300px; } .card:hover>.cardicon { top: 30px; right: 30px; width: 150px; height: 150px; } .card>.text>.mail { position: relative; font-size: 17px; line-height: 20px; font-weight: 400; color: inherit; text-decoration: none; } .card>.text>.username { position: relative; margin: 0; font-size: 32px; line-height: 36px; } .card>.text>.mail::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: gray; transition: 0.3s; } .card>.text>h2::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: gray; transition: 0.3s; } .card>.text>.username:hover::after { width: 50%; } .card>.text>.mail:hover::after { width: 100%; } .card>.text { opacity: 0; position: absolute; bottom: 30px; left: 30px; transition: 0.3s; } .card:hover>.text { opacity: 1; }