-
Notifications
You must be signed in to change notification settings - Fork 0
/
tree.html
180 lines (158 loc) · 3.52 KB
/
tree.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
/* Product Card Styles */
/* Base Styles */
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(135deg, #ece9e6, #ffffff);
font-family: 'Arial', sans-serif;
margin: 0;
}
/* Product Card Styles */
.creative-product-card {
position: relative;
width: 400px;
height: 400px;
background: #fff;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
transform: scale(1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.creative-product-card:hover {
transform: scale(1.05);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}
/* Discount Badge */
.discount-badge {
position: absolute;
top: 12px;
left: 12px;
background: linear-gradient(135deg, #ff7e5f, #feb47b);
color: #fff;
padding: 5px 15px;
font-size: 14px;
font-weight: bold;
border-radius: 12px;
z-index: 2;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
/* Wishlist Icon */
.wishlist-icon {
position: absolute;
top: 12px;
right: 12px;
font-size: 24px;
color: #ccc;
z-index: 2;
cursor: pointer;
transition: color 0.3s ease, transform 0.3s ease;
}
.creative-product-card:hover .wishlist-icon {
color: #ff4757;
transform: scale(1.2);
}
/* Image Container */
.image-container {
width: 100%;
height: 70%;
overflow: hidden;
position: relative;
}
.image-container img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s ease;
}
.creative-product-card:hover .image-container img {
transform: scale(1.1);
}
/* Text Container */
.text-container {
text-align: center;
padding: 20px;
}
.text-container h3 {
font-size: 20px;
font-weight: bold;
color: #333;
margin: 0;
}
.text-container p {
margin: 5px 0 0;
font-size: 18px;
color: #777;
}
/* Hover Actions (Buttons) */
.hover-actions {
position: absolute;
bottom: -80px;
left: 0;
width: 100%;
display: flex;
justify-content: space-evenly;
transition: bottom 0.4s ease;
}
.creative-product-card:hover .hover-actions {
bottom: 20px;
}
.hover-actions button {
padding: 12px 24px;
font-size: 16px;
font-weight: bold;
color: #fff;
background: #007bff;
border: none;
border-radius: 8px;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transform: translateY(100px);
opacity: 0;
transition: transform 0.4s ease, opacity 0.4s ease, background 0.3s ease;
}
.creative-product-card:hover .hover-actions button {
transform: translateY(0);
opacity: 1;
}
.hover-actions .add-to-cart {
background: linear-gradient(135deg, #28a745, #20c997);
}
.hover-actions .add-to-cart:hover {
background: #218838;
}
.hover-actions .buy-now {
background: linear-gradient(135deg, #ff7e5f, #eb3349);
}
.hover-actions .buy-now:hover {
background: #c82333;
}
</style>
</head>
<body>
<div class="creative-product-card">
<div class="discount-badge">20% OFF</div>
<div class="wishlist-icon">♡</div>
<div class="image-container">
<img src="your-image-url.jpg" alt="Product Image" />
</div>
<div class="text-container">
<h3>Stylish Product</h3>
<p>$49.99</p>
</div>
<div class="hover-actions">
<button class="add-to-cart">Add to Cart</button>
<button class="buy-now">Buy Now</button>
</div>
</div>
</body>
</html>