Skip to content

Commit 33c31dd

Browse files
张欧文张欧文
张欧文
authored and
张欧文
committed
finish challenage 2
1 parent 37a5042 commit 33c31dd

File tree

2 files changed

+65
-22
lines changed

2 files changed

+65
-22
lines changed

starter/02-HTML-Fundamentals/challenge.html

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,27 @@
77
<title>Challenges</title>
88
<link href="stylec.css" rel="stylesheet" />
99
</head>
10-
<body>
11-
<article>
12-
<h2>Converse Chuck Taylor All Star Low Top</h2>
13-
<img src="img/challenges.jpg" width="100" height="100" alt="图片炸了" />
14-
<p><b>$65.00</b></p>
15-
<p class="fshi">Free shipping</p>
16-
<p>
17-
Ready to dress up or down, these classic canvas Chucks are an everyday
18-
wardrobe staple
19-
</p>
20-
<a href="#">More information &rarr;</a>
21-
<h3>Product details</h3>
22-
<ul class="details">
23-
<li>Lightweight, durable canvas sneaker</li>
24-
<li>Lightly padded footbed for added comfort</li>
25-
<li>Iconic Chuck Taylor ankle patch</li>
26-
</ul>
10+
<div class="container">
11+
<body>
12+
<article>
13+
<h2>Converse Chuck Taylor All Star Low Top</h2>
14+
<img src="img/challenges.jpg" width="200" height="200" alt="图片炸了" />
15+
<p><b>$65.00</b></p>
16+
<p class="fshi">Free shipping</p>
17+
<p>
18+
Ready to dress up or down, these classic canvas Chucks are an everyday
19+
wardrobe staple
20+
</p>
21+
<a href="#">More information &rarr;</a>
22+
<h3>Product details</h3>
23+
<ul class="details">
24+
<li>Lightweight, durable canvas sneaker</li>
25+
<li>Lightly padded footbed for added comfort</li>
26+
<li>Iconic Chuck Taylor ankle patch</li>
27+
</ul>
2728

28-
<button>Add to cart</button>
29-
</article>
30-
</body>
29+
<button class="add-to-cart">Add to cart</button>
30+
</article>
31+
</body>
32+
</div>
3133
</html>

starter/02-HTML-Fundamentals/stylec.css

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,43 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
}
5+
16
body {
27
font-family: sans-serif;
38
line-height: 1.4;
4-
border: 5px solid black;
9+
}
10+
11+
p {
12+
margin-bottom: 15px;
513
}
614

715
h2 {
816
text-align: center;
917
background-color: #f7f7f7;
1018
text-transform: uppercase;
1119
font-size: 22px;
20+
/* height: 40px; */
21+
padding: 10px;
22+
text-align: center;
1223
}
1324

25+
h3 {
26+
margin-top: 30px;
27+
}
1428
b {
1529
font-size: 24px;
1630
}
1731

1832
button {
33+
/* height: 50px; */
34+
border-left: 0;
35+
border-right: 0;
36+
border-bottom: 0;
37+
padding: 15px;
1938
font-size: 26px;
20-
border: none;
39+
margin: 0;
40+
border-top: 5px solid black;
2141
background-color: black;
2242
color: white;
2343
cursor: pointer;
@@ -43,6 +63,15 @@ a:active {
4363
button:hover {
4464
background-color: white;
4565
color: black;
66+
/* border-top: 5px solid black; */
67+
}
68+
69+
li {
70+
margin-bottom: 10px;
71+
}
72+
73+
ul {
74+
margin-left: 18px;
4675
}
4776

4877
.fshi {
@@ -55,3 +84,15 @@ button:hover {
5584
.details {
5685
list-style: square;
5786
}
87+
88+
.add-to-cart {
89+
width: 100%;
90+
}
91+
92+
.container {
93+
border: 5px solid black;
94+
width: 825px;
95+
/* height: auto; */
96+
margin: 50px auto;
97+
padding: 0;
98+
}

0 commit comments

Comments
 (0)