-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
159 lines (146 loc) · 4.29 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
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fraunces:wght@700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<title>Frontend Mentor | Product preview card component</title>
<!-- Feel free to remove these styles or customise in your own stylesheet 👍 -->
<style>
.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }
*{
box-sizing: border-box;
}
body{
background-color: hsl(30, 38%, 92%);
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: 'Montserrat', sans-serif;
}
.design{
display:flex;
border-radius: 15px;
overflow: hidden;
}
.design .content{
background-color: #FFF;
padding: 20px 40px;
width:50%
}
.design .image .image-product-mobile{
display: none;
}
.content h4{
color: hsl(228, 12%, 48%);
font-weight: 300;
font-size: 30px;
letter-spacing: 20px;
text-transform: uppercase;
}
.content h1{
font-family: 'Fraunces', 'sans';
font-size: 3.5rem;
}
.content p{
font-weight: 300;
line-height: 33px;
color: hsl(228, 12%, 48%);
}
.design .image{
width: 50%;
background-size: cover;
background-image: url("./images/image-product-desktop.jpg");
background-repeat: no-repeat;
background-position: center center;
}
.price{
display: flex;
justify-content: space-between;
align-items: center;
width: 270px;
}
.price span:first-child{
font-size: 3rem;
color: hsl(158, 36%, 37%);
font-weight: 700;
font-family: 'Fraunces', 'sans';
}
.price span.before-discounted{
color: hsl(228, 12%, 48%);
font-weight: 300;
text-decoration: line-through;
}
.button {
text-align: center;
margin-top:25px;
margin-bottom: 25px;
}
.button a{
text-decoration: none;
color: #FFF;
font-size: 1.5rem;
background-color: hsl(158, 36%, 37%);
text-align: center;
padding: 15px 10px;
display: block;
border-radius: 7px;
transition: 0.3s;
}
.button a:hover{
background-color: hsl(212, 21%, 14%);
}
@media (max-width:1440px) {
body{
height:auto
}
.design{
justify-content: center;
align-items: center;
flex-direction: column;
width: 565px;
}
.design .image{
background-image: url("./images/image-product-mobile.jpg");
height: 350px;
width: 100%;
}
.design .content{
width: 100%;
}
}
</style>
</head>
<body>
<div class="design">
<!-- image -->
<div class="image">
</div>
<!-- content -->
<div class="content">
<h4>Perfume</h4>
<h1>Gabrielle Essence Eau De Parfum</h1>
<p class="text">
A floral, solar and voluptuous interpretation composed by Olivier Polge,
Perfumer-Creator for the House of CHANEL.
</p>
<div class="price">
<span class="discounted">$149.99</span>
<span class="before-discounted">$169.99</span>
</div>
<div class="button">
<a href="">
<svg width="15" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M14.383 10.388a2.397 2.397 0 0 0-1.518-2.222l1.494-5.593a.8.8 0 0 0-.144-.695.8.8 0 0 0-.631-.28H2.637L2.373.591A.8.8 0 0 0 1.598 0H0v1.598h.983l1.982 7.4a.8.8 0 0 0 .799.59h8.222a.8.8 0 0 1 0 1.599H1.598a.8.8 0 1 0 0 1.598h.943a2.397 2.397 0 1 0 4.507 0h1.885a2.397 2.397 0 1 0 4.331-.376 2.397 2.397 0 0 0 1.12-2.021ZM11.26 7.99H4.395L3.068 3.196h9.477L11.26 7.991Zm-6.465 6.392a.8.8 0 1 1 0-1.598.8.8 0 0 1 0 1.598Zm6.393 0a.8.8 0 1 1 0-1.598.8.8 0 0 1 0 1.598Z" fill="#FFF"/></svg>
Add to Cart
</a>
</div>
</div>
</div>
</body>
</html>