How to make Responsive Product Cards design with 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;
}
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(to right, #243949 0%, #517fa4 100%);
}
.card{
display: flex;
flex-direction:column;
align-items:center;
border-radius: 10px;
width:700px;
height:460px;
background-color:#262626;
color:#fff;
padding:10px;
row-gap:10px;
box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}
.cardin1{
padding:10px;
display: flex;
align-items: center;
border-radius: 10px;
width:100%;
height:350px;
background-color: #343434;
}
.cardin1c1{
display: flex;
flex-direction:column;
align-items: center;
justify-content: center;
width:50%;
height:350px;
}
.cardin1c1 .star-rating{
font-size: 14px;
}
.cardin1c2 .star-rating .fas.fa-star{
color: gold;
}
.cardin1c2 .star-rating .fas.fa-star-half-alt{
color: gold;
border: none;
}
.cardin1c2{
display: flex;
flex-direction:column;
align-items:start;
width:50%;
height:350px;
}
.cardin1c1 img{
width: 250px;
height:330px;
border-radius: 5px;
object-fit:cover;
filter: drop-shadow(0px 0px 15px #000000);
}
.cardin1c2 h2{
margin:10px 0px 0px 0px;
font-family: 'Play', sans-serif;
font-size: 59px;
color:#7babff
}
.cardin1c2 h6{
margin:2px 0px 10px 0px;
font-size:10px;
}
.cardin1c2 p{
margin:0px;
font-size:14px;
color:#ddd;
}
.cardin2{
display: flex;
flex-direction:row;
justify-content: space-between;
border-radius: 10px;
width:100%;
height:80px;
}
.cardin2 button{
margin:auto;
border:none;
padding:15px;
background-color:#343434;
border-radius:10px;
font-size:16px;
transition:.5s;
color: #ddd;
width:46%;
cursor: pointer;
}
.cardin2 button:nth-child(1):hover{
transform: scale(1.05);
color:hotpink;
}
.cardin2 button:nth-child(2):hover{
transform: scale(1.05);
color:rgb(79, 173, 255);
}
@media only screen and (max-width: 630px){
.section1{
height: fit-content;
}
.card{
margin-top:20px;
width:90%;
height:100%;
}
.cardin1{
flex-direction: column;
height:100%;
}
.cardin1c1{
width:100%;
}
.cardin1c2 h2{
font-size:30px;
}
.cardin1c2{
width:100%;
}
.cardin2 button{
font-size:12px;
height:100%;
}
}
.credit a{
text-decoration: none;
color: #fff;
font-weight: 800;
}
.credit{
color: #fff;
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 Responsive Product Cards design with 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