Skip to content

Commit b73473a

Browse files
张欧文张欧文
张欧文
authored and
张欧文
committed
finish 03 css fundementals
1 parent 26c632f commit b73473a

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

starter/02-HTML-Fundamentals/challenge.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ <h2>Converse Chuck Taylor All Star Low Top</h2>
1818
Ready to dress up or down, these classic canvas Chucks are an everyday
1919
wardrobe staple
2020
</p>
21-
<a href="#">More information &rarr;</a>
21+
<a class="more" href="#">More information &rarr;</a>
22+
23+
<div class="color-bars">
24+
<div class="color-bar color-1">&nbsp</div>
25+
<div class="color-bar color-2">&nbsp</div>
26+
<div class="color-bar color-3">&nbsp</div>
27+
<div class="color-bar color-4">&nbsp</div>
28+
<div class="color-bar color-5">&nbsp</div>
29+
<div class="color-bar color-6">&nbsp</div>
30+
</div>
2231
<h3>Product details</h3>
2332
<ul class="details">
2433
<li>Lightweight, durable canvas sneaker</li>

starter/02-HTML-Fundamentals/stylec.css

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ li {
7171
}
7272

7373
ul {
74-
margin-left: 18px;
74+
margin-left: 20px;
7575
}
7676

7777
.fshi {
@@ -95,4 +95,53 @@ ul {
9595
/* height: auto; */
9696
margin: 50px auto;
9797
padding: 0;
98+
position: relative;
99+
}
100+
101+
.container::before {
102+
position: absolute;
103+
content: "SALE";
104+
background-color: red;
105+
color: white;
106+
padding: 5px;
107+
top: -20px;
108+
left: -30px;
109+
width: 50px;
110+
text-align: center;
111+
letter-spacing: 2px;
112+
}
113+
.color-bars {
114+
margin-top: 30px;
115+
display: block;
116+
}
117+
118+
.color-bar {
119+
display: inline-block;
120+
width: 20px;
121+
height: 20px;
122+
margin-right: 10px;
123+
}
124+
125+
.color-1 {
126+
background-color: black;
127+
}
128+
129+
.color-2 {
130+
background-color: blue;
131+
}
132+
133+
.color-3 {
134+
background-color: red;
135+
}
136+
137+
.color-4 {
138+
background-color: yellow;
139+
}
140+
141+
.color-5 {
142+
background-color: green;
143+
}
144+
145+
.color-6 {
146+
background-color: cyan;
98147
}

0 commit comments

Comments
 (0)