How to make Profile Card Design using HTML and CSS.[Source Code]
To make this website, you would like to make two files: an HTML file, a CSS file. First, create an HTML file with the name of index.html and remember, you have to create a file with a .html extension.
/**
Hello Future Developer Thanks for Using learningrobo.com,
Check our website Regularly For New Snippets Post.
Share & Support us
**/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
* {
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
background: #ecf0f3;
}
.container{
display: flex;
height: 100vh;
width: 100vw;
align-items: center;
justify-content: center;
gap: 20px;
}
.wrapper,
.wrapper .img-area,
.social-icons a,
.buttons button {
background: #ecf0f3;
box-shadow: -3px -3px 7px #ffffff, 3px 3px 5px #ceced1;
}
.wrapper {
position: relative;
width: 350px;
padding: 30px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.wrapper .icon {
font-size: 17px;
color: #31344b;
position: absolute;
cursor: pointer;
opacity: 0.7;
top: 15px;
height: 35px;
width: 35px;
text-align: center;
line-height: 35px;
border-radius: 50%;
font-size: 16px;
}
.wrapper .icon i {
position: relative;
z-index: 9;
}
.wrapper .icon.arrow {
left: 15px;
}
.wrapper .icon.dots {
right: 15px;
}
.wrapper .img-area {
height: 150px;
width: 150px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.img-area .inner-area {
height: calc(100% - 25px);
width: calc(100% - 25px);
border-radius: 50%;
}
.inner-area img {
height: 100%;
width: 100%;
border-radius: 50%;
object-fit: cover;
}
.wrapper .name {
font-size: 23px;
font-weight: 500;
color: #31344b;
margin: 10px 0 5px 0;
}
.wrapper .about {
color: #44476a;
font-weight: 400;
font-size: 16px;
}
.wrapper .social-icons {
margin: 15px 0 25px 0;
}
.social-icons a {
position: relative;
height: 40px;
width: 40px;
margin: 0 5px;
display: inline-flex;
text-decoration: none;
border-radius: 50%;
}
.social-icons a:hover::before,
.wrapper .icon:hover::before,
.buttons button:hover:before {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
border-radius: 50%;
background: #ecf0f3;
box-shadow: inset -3px -3px 7px #ffffff, inset 3px 3px 5px #ceced1;
}
.buttons button:hover:before {
z-index: -1;
border-radius: 5px;
}
.social-icons a i {
position: relative;
z-index: 3;
text-align: center;
width: 100%;
height: 100%;
line-height: 40px;
}
.social-icons a.fb i {
color: #4267b2;
}
.social-icons a.twitter i {
color: #1da1f2;
}
.social-icons a.insta i {
color: #e1306c;
}
.social-icons a.yt i {
color: #ff0000;
}
.wrapper .buttons {
display: flex;
width: 100%;
justify-content: space-between;
}
.buttons button {
position: relative;
width: 100%;
border: none;
outline: none;
padding: 12px 0;
color: #31344b;
font-size: 17px;
font-weight: 400;
border-radius: 5px;
cursor: pointer;
z-index: 4;
}
.buttons button:first-child {
margin-right: 10px;
}
.buttons button:last-child {
margin-left: 10px;
}
.wrapper .social-share {
display: flex;
width: 100%;
margin-top: 30px;
padding: 0 5px;
justify-content: space-between;
}
.social-share .row {
color: #31344b;
font-size: 17px;
cursor: pointer;
position: relative;
}
.social-share .row::before {
position: absolute;
content: "";
height: 100%;
width: 2px;
background: #e0e6eb;
margin-left: -25px;
}
.row:first-child::before {
background: none;
}
.social-share .row i.icon-2 {
position: absolute;
left: 0;
top: 50%;
color: #31344b;
transform: translateY(-50%);
opacity: 0;
pointer-events: none;
transition: all 0.3s ease;
}
.row:nth-child(1):hover i.fa-heart,
.row:nth-child(2):hover i.fa-comment {
opacity: 1;
pointer-events: auto;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
}
.credit a {
text-decoration: none;
color: #121212;
font-weight: 800;
}
.credit {
color: #121212;
text-align: center;
margin-top: 10px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.credit span {
color: #000;
font-size: 20px;
}
@media screen and (min-width: 1025px) {
.container {
flex-direction: row;
}
}
@media screen and (max-width: 1024px) {
.wrapper {
width: 100%;
max-width: 300px;
padding: 20px;
margin-bottom: 20px;
}
.wrapper .name {
font-size: 20px;
}
.wrapper .about {
font-size: 14px;
}
.social-icons a {
height: 35px;
width: 35px;
}
.social-icons a i {
line-height: 35px;
}
.buttons button {
padding: 10px 0;
font-size: 15px;
}
.wrapper .social-share .row {
font-size: 15px;
}
}
@media screen and (max-width: 630px) {
.container{
height: auto;
}
.wrapper {
width: 100%;
max-width: 250px;
padding: 15px;
margin-bottom: 15px;
}
.wrapper .name {
font-size: 18px;
}
.wrapper .about {
font-size: 12px;
}
.social-icons a {
height: 30px;
width: 30px;
}
.social-icons a i {
line-height: 30px;
}
.buttons button {
padding: 8px 0;
font-size: 13px;
}
.wrapper .social-share .row {
font-size: 13px;
}
}
Thank you for reading our blog. If you face any problem in Creating a Profile Card Design using HTML and CSS., then contact us or comment to us. We’ll try to provide a solution to your problem as soon as possible.
Explore
Press The Key ' p ' and say ' read article ' our voice assistant read our article.
In Our older post it doesnot work we working on that.
In Our older post it doesnot work we working on that.
إرسال تعليق
Thank you
Learning robo team