-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
147 lines (137 loc) · 3.74 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Product Page</title>
<style>
/* Style for the product card container */
.container {
margin-top: 20px;
}
/* Style for the product card */
.card {
border: 1px solid #ddd;
border-radius: 5px;
overflow: hidden;
transition: transform 0.2s, box-shadow 0.2s;
width: 100%;
max-width: 300px; /* Adjust the max width as needed */
margin: 0 auto;
background-color: #fff;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}
/* Style for the image container */
.image-container {
position: relative;
overflow: hidden;
}
/* Style for the discount label */
.discount {
position: absolute;
top: 5px;
right: 5px;
background-color: #e74c3c;
color: #fff;
padding: 5px 10px;
border-radius: 3px;
font-size: 14px;
}
/* Style for the heart icon (wishlist) */
.wishlist {
position: absolute;
top: 5px;
left: 5px;
font-size: 20px;
color: #e74c3c;
cursor: pointer;
}
/* Style for the product image */
.card-img-top {
max-height: 200px;
object-fit: cover; /* Preserve aspect ratio and cover container */
width: 100%;
}
/* Style for the product title */
.card-title {
font-size: 18px;
margin: 10px;
color: #333;
}
/* Style for the product price */
.card-text .price {
font-size: 16px;
margin: 0 10px;
color: #e74c3c;
}
/* Style for the product rating */
.card-text .rating {
font-size: 14px;
margin: 0 10px;
color: #666;
}
/* Style for the "Add to Cart" button */
.btn-primary {
background-color: #3498db;
color: #fff;
border: none;
border-radius: 5px;
padding: 5px 10px;
font-size: 14px;
cursor: pointer;
margin: 10px;
display: block;
width: 80%;
margin: 0 auto;
}
.btn-delete {
background-color: red;
color: #fff;
border: none;
border-radius: 5px;
padding: 5px 10px;
font-size: 14px;
cursor: pointer;
margin: 10px;
display: block;
width: 80%;
margin: 0 auto;
}
/* Hover effect for the product card */
.card:hover {
transform: scale(1.05); /* Increase size on hover */
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}
</style>
</head>
<body>
<div class="container mt-5">
<div class="row">
<div class="col-md-4">
<div class="card">
<div class="image-container">
<div class="first">
<div class="d-flex justify-content-between align-items-center">
<span class="discount">-X%</span>
<span class="wishlist">
<i class="fa fa-heart-o"></i>
</span>
</div>
</div>
<img src="" alt="Product Image" class="card-img-top" />
</div>
<div class="card-body">
<h5 class="card-title">Product Title</h5>
<p class="card-text">
Price: $X.XX<br />
Rating: X.X
</p>
<button class="btn btn-primary">Add to Cart</button>
<button class="btn btn-delete">Delete</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>