How to make Social Media Card 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=Play&display=swap');
*{
box-sizing: border-box;
}
:root{
--bg:#121212;
--fontcolor:#eee;
}
body{
font-family: Arial, sans-serif;
margin:0%;
}
.section1{
height: 100vh;
display: flex;
flex-direction: column;
justify-content:center;
align-items: center;
background-image: linear-gradient(60deg, #abecd6 0%, #fbed96 100%);
}
.card{
display: flex;
flex-direction:row;
justify-content:space-between;
border-radius: 10px;
width:600px;
height:300px;
background-color:var(--bg);
padding:20px;
box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
}
.cardin1{
display: flex;
flex-direction:column;
align-items:center;
border-radius:10px;
height:260px;
width:250px;
}
.cardin1 img{
width:100%;
height:260px;
border-radius:5px;
margin:0px;
object-fit:cover;
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}
.cardin2{
display: flex;
flex-direction:column;
align-items: center;
height:260px;
padding:30px;
width:350px;
color:var(--fontcolor)
}
.cardin2 h2{
margin:0px;
font-family: 'Play', sans-serif;
font-size: 25px;
}
.cardin2 h6{
margin:0px;
font-size:12px;
}
.cardin2 h5{
margin:0px;
font-size:18px;
font-weight: 300;
}
.cardin2 p{
margin:0px;
font-size:16px;
font-weight:100;
}
.cardin2 .info{
display: flex;
justify-content: center;
align-items: center;
text-align: center;
width:360px;
height:60px;
column-gap:40px;
margin:10px 0px;
}
.cardin2 .button{
display: flex;
column-gap:10px;
}
.cardin2 .button button{
padding: 10px 20px;
font-size: 16px;
border-radius: 30px;
transition: .5s;
}
.cardin2 .button button:nth-child(1){
border:2px solid #121212;
background-image: linear-gradient(60deg, #abecd6 0%, #fbed96 100%);
color:#121212;
}
.cardin2 .button button:nth-child(2){
border:2px solid #fbed96;
background-color:#121212;
color: #fbed96;
}
.cardin2 button:hover{
transform: scale(1.05);
cursor: pointer;
}
@media only screen and (max-width: 630px){
.card{
flex-direction: column;
width:98%;
height:fit-content;
}
.cardin1{
align-items: center;
height:fit-content;
width:100%;
}
.cardin2{
width:100%;
justify-content: center;
}
}
.credit a{
text-decoration: none;
color: #eee;
font-weight: 800;
}
.credit{
color: #eee;
text-align: center;
margin-top: 10px;
font-family: Verdana,Geneva,Tahoma,sans-serif;
}
Thank you for reading our blog. If you face any problem in Creating a Social Media card 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.
Post a Comment
Thank you
Learning robo team