Skip to content

Commit 0ff2bf1

Browse files
author
user
committed
Ajout d'un hero
1 parent 19908ad commit 0ff2bf1

File tree

5 files changed

+112
-3
lines changed

5 files changed

+112
-3
lines changed

basket.webp

1.44 KB
Loading

hero.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<link rel="stylesheet" href="style.css">
7+
<title>Hero</title>
8+
</head>
9+
<body>
10+
<section class="hero">
11+
<!-- <img src="./milkyway.jpg" alt="MilkyWay"> -->
12+
<h1>Milkyway</h1>
13+
</section>
14+
15+
</body>
16+
</html>

index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@
1515
<span>Recherche</span>
1616
</header>
1717
<main>
18-
<section>
18+
<section class="section">
1919
<div class="box1 box">1</div>
2020
<div class="box2 box">2</div>
2121
<div class="box3 box">3</div>
2222
<div class="box4 box">4</div>
2323
</section>
24+
<section class="section2">
25+
<img src="basket.webp" alt="Basket">
26+
<span class="marque">nike</span>
27+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Magni sit ipsam odit illo nam beatae iusto corrupti sed similique explicabo quisquam vel provident necessitatibus, temporibus obcaecati eaque veniam debitis quis.</p>
28+
</section>
2429
</main>
2530
</body>
2631
</html>

milkyway.jpg

234 KB
Loading

style.css

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55
outline: solid 2px red;
66
}
77

8-
section {
8+
img {
9+
max-width: 100%;
10+
height: auto;
11+
}
12+
13+
.section {
914
display: flex;
1015
justify-content: space-evenly;
16+
/* position: absolute; */
1117
}
1218

1319
header {
@@ -24,4 +30,86 @@ list-style: none;
2430
header ul {
2531
display: flex;
2632
gap:1rem;
27-
}
33+
}
34+
35+
.box4 {
36+
background-color: blueviolet;
37+
color: aliceblue;
38+
font-size: 2rem;
39+
display: flex;
40+
justify-content: center;
41+
align-items: center;
42+
43+
/* position: relative;
44+
top: 200px;
45+
right: 200px; */
46+
}
47+
48+
.section2 {
49+
outline: solid 2px green;
50+
max-width: 30rem;
51+
height: 70vh;
52+
margin: 0 auto;
53+
padding: 2rem;
54+
font-size: 18px;
55+
display: flex;
56+
flex-direction: column;
57+
justify-content: center;
58+
/* position: relative; */
59+
}
60+
61+
.section2 img {
62+
/* outline: 2px dashed blue; */
63+
}
64+
65+
.section2 p {
66+
text-align: center;
67+
/* font-size: 2em;; */
68+
}
69+
70+
.marque {
71+
position: absolute;
72+
top: 1rem;
73+
right: 2rem;;
74+
text-transform: uppercase;
75+
font-weight: bolder;
76+
}
77+
78+
/*- HERO -*/
79+
80+
/* .hero {
81+
position: relative;
82+
}*/
83+
84+
.hero h1 {
85+
color: white;
86+
text-transform: uppercase;
87+
background-color: #333;
88+
padding: 1rem 2rem;
89+
}
90+
91+
/*.hero h1 {
92+
position: absolute;
93+
top: 50%;
94+
right: 50%;
95+
transform: translate(50%,-50%);
96+
} */
97+
98+
.hero {
99+
background-image: url("./milkyway.jpg") ;
100+
background-repeat: no-repeat;
101+
background-size: cover;
102+
height: 853px;
103+
display: flex;
104+
justify-content: center;
105+
align-items: center;
106+
outline: solid 2px red;;
107+
}
108+
109+
110+
111+
112+
113+
114+
115+

0 commit comments

Comments
 (0)