You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
172 lines
3.5 KiB
172 lines
3.5 KiB
<style>
|
|
.card {
|
|
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
|
|
width: 250px;
|
|
margin: auto;
|
|
text-align: center;
|
|
font-family: arial;
|
|
}
|
|
|
|
.price {
|
|
color: grey;
|
|
font-size: 22px;
|
|
}
|
|
|
|
.card button {
|
|
border: none;
|
|
outline: 0;
|
|
padding: 12px;
|
|
color: white;
|
|
background-color: #000;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
width: 100%;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.card button:hover {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
|
|
*{
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: Arial, Helvetica, sans-serif;
|
|
}
|
|
|
|
/* Float four columns side by side */
|
|
.column {
|
|
float: left;
|
|
width: 25%;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
/* Remove extra left and right margins, due to padding in columns */
|
|
.row {margin: 0 -5px;}
|
|
|
|
/* Clear floats after the columns */
|
|
.row:after {
|
|
content: "";
|
|
display: table;
|
|
clear: both;
|
|
}
|
|
|
|
/* Style the counter cards */
|
|
.card {
|
|
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); /* this adds the "card" effect */
|
|
padding: 16px;
|
|
text-align: center;
|
|
background-color: #f1f1f1;
|
|
}
|
|
|
|
/* Responsive columns - one column layout (vertical) on small screens */
|
|
@media screen and (max-width: 600px) {
|
|
.column {
|
|
width: 100%;
|
|
display: block;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
|
|
.grid-container {
|
|
display: grid;
|
|
grid-template-columns: auto auto auto;
|
|
width: 100%;
|
|
}
|
|
.grid-item{
|
|
display: table-cell;
|
|
padding: 15px;
|
|
}
|
|
|
|
.topnav {
|
|
background-color: #333;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Style the links inside the navigation bar */
|
|
.topnav a {
|
|
float: center;
|
|
color: #f2f2f2;
|
|
text-align: center;
|
|
padding: 14px 16px;
|
|
text-decoration: none;
|
|
font-size: 17px;
|
|
}
|
|
|
|
/* Change the color of links on hover */
|
|
.topnav a:hover {
|
|
background-color: #ddd;
|
|
color: black;
|
|
}
|
|
|
|
/* Add a color to the active/current link */
|
|
.topnav a.active {
|
|
background-color: #04AA6D;
|
|
color: white;
|
|
}
|
|
|
|
.banner {
|
|
/* The image used */
|
|
background-image:
|
|
url(1.jpg);
|
|
background-position: center;
|
|
background-size: cover;
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<body>
|
|
<div class="banner">
|
|
<div class="menu1" >
|
|
<ul>
|
|
<li><a href="products/fruits">FRUITS</a></li>
|
|
<li><a href="products/household">HOUSEHOLD</a></li>
|
|
<li><a href="products/dairy">DAIRY</a></li>
|
|
<li><a href="products/wholegrain">WHOLEGRAIN</a></li>
|
|
<li><a href="products/snacks">SNACKS</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="grid-container" >
|
|
<div class="grid-item"*ngFor="let i of products">
|
|
<div class="card">
|
|
<img src={{i.image}} style="width:80%">
|
|
<h2 style="color:black">{{ i.name }}</h2>
|
|
<p class="price">Rs. {{ i.price }}</p>
|
|
<p><button>Add to Cart</button></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|