Skip to content

Commit 9830c91

Browse files
张欧文张欧文
张欧文
authored and
张欧文
committed
absolute position
1 parent 33c31dd commit 9830c91

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ <h6>The Basic Language of the Web: HTML</h6>
1717
-->
1818

1919
<div class="container">
20+
<!-- <div class="test">
21+
<p class="test">
22+
All modern websites and web applications are built using three
23+
<em>fundamental</em>
24+
technologies: HTML, CSS and JavaScript. These are the languages of the
25+
web.
26+
</p>
27+
28+
<p class="test">
29+
In this post, let's focus on HTML. We will learn what HTML is all
30+
about, and why you too should learn it.
31+
</p>
32+
</div> -->
2033
<header class="main-header">
2134
<h1>📘 The Code Magazine</h1>
2235

@@ -148,7 +161,7 @@ <h4><strong>Related posts</strong></h4>
148161
height="75"
149162
/>
150163
<a href="#">Why JavaScript is Awesome</a>
151-
<p class="related-author">By Matilda</p>
164+
<p class="r🚢elated-author">By Matilda</p>
152165
</li>
153166
</ul>
154167
</aside>
@@ -159,5 +172,7 @@ <h4><strong>Related posts</strong></h4>
159172
</p>
160173
</footer>
161174
</div>
175+
176+
<button class="like">🌋like!!</button>
162177
</body>
163178
</html>

starter/03-CSS-Fundamentals/style.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
body {
77
border-top: #1098ad solid 10px;
8+
position: relative;
89
}
910

1011
article {
@@ -69,10 +70,22 @@ footer p {
6970
font-size: 16px;
7071
}
7172

73+
nav a:link {
74+
margin: 10px;
75+
margin-top: 10px;
76+
display: inline-block;
77+
}
78+
79+
nav a:link:last-child {
80+
margin-right: 0;
81+
}
7282
/* article header p {
7383
font-style: italic;
7484
} */
7585

86+
/* .test {
87+
display: inline-block;
88+
} */
7689
#author {
7790
font-style: italic;
7891
font-size: 18px;
@@ -160,3 +173,13 @@ a:active {
160173
/* #copyright {
161174
color: orangered;
162175
} */
176+
.like {
177+
font-size: 33px;
178+
cursor: pointer;
179+
padding: 10px;
180+
position: absolute;
181+
/* top: 0;
182+
left: 0; */
183+
bottom: 50px;
184+
right: 50px;
185+
}

0 commit comments

Comments
 (0)