Skip to content

Commit 38870fe

Browse files
committed
hero p2
1 parent ce748ad commit 38870fe

File tree

2 files changed

+67
-9
lines changed

2 files changed

+67
-9
lines changed

starter/07-Omnifood-Desktop/css/style.css

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,12 @@ Default: 1
1414
--- 02 Colors System
1515
1616
- Primary: #e67e22
17-
18-
- 比较暗的
19-
- Tints:
20-
21-
- 比较亮的
17+
- Tints: #fdf2e9
2218
- Shades:
23-
2419
- Accents:
25-
2620
- Greys:
2721
#555
22+
#333
2823
2924
3025
--- 05 Shadows
@@ -55,13 +50,74 @@ body {
5550
color: #555;
5651
}
5752

53+
.section-hero {
54+
background-color: #fdf2e9;
55+
padding: 9.6rem 0;
56+
}
57+
5858
.hero {
5959
max-width: 130rem;
6060
margin: 0 auto;
6161
display: grid;
6262
grid-template-columns: 1fr 1fr;
63+
align-items: center;
64+
gap: 9.6rem;
65+
}
66+
67+
.heading-primary {
68+
font-size: 5.2rem;
69+
font-weight: 700;
70+
line-height: 1.05;
71+
color: #333;
72+
letter-spacing: -0.5px;
73+
margin-bottom: 3.2rem;
74+
}
75+
.hero-description {
76+
font-size: 2rem;
77+
line-height: 1.6;
78+
margin-bottom: 4.8rem;
79+
}
80+
81+
.btn:link,
82+
.btn:visited {
83+
display: inline-block;
84+
font-size: 2rem;
85+
text-decoration: none;
86+
padding: 1.6rem 3.2rem;
87+
border-radius: 9px;
88+
/* Put transition on original "state" */
89+
transition: background-color 0.3s;
6390
}
6491

92+
.btn--full:link,
93+
.btn--full:visited {
94+
background-color: #e67e22;
95+
color: #fff;
96+
}
97+
98+
.btn--full:hover,
99+
.btn--full:active {
100+
background-color: #cf711f;
101+
}
102+
103+
.btn--outline:link,
104+
.btn--outline:visited {
105+
background-color: #fff;
106+
color: #555;
107+
}
108+
109+
.btn--outline:hover,
110+
.btn--outline:active {
111+
background-color: #fdf2e9;
112+
/* border: 3px solid #fff; */
113+
114+
/* Trick to add border inside */
115+
box-shadow: inset 0 0 3px #fff;
116+
}
65117
.hero-img {
66118
width: 100%;
67119
}
120+
121+
.margin-right-sm {
122+
margin-right: 1.6rem !important;
123+
}

starter/07-Omnifood-Desktop/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ <h1 class="heading-primary">
1919
healthy again. Tailored to your personal tastes and nutritional
2020
needs. We have delivered 250,000+ meals last year!
2121
</p>
22-
<a href="#" class="btn">Start eating well</a>
23-
<a href="#" class="btn">Lear more &rarr;</a>
22+
<a href="#" class="btn btn--full margin-right-sm"
23+
>Start eating well</a
24+
>
25+
<a href="#" class="btn btn--outline">Lear more &rarr;</a>
2426
</div>
2527
<div class="hero-img-box">
2628
<img

0 commit comments

Comments
 (0)