python实战计划 制作自己网页

忘记领50rmb优惠卷了…那只能好好学了呗

最终成果

我的代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>spring blossom</title>
<!-- 这里一定得写rel类型啊....-->
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<div class="header">
<img src="images/blah.png">
<ul class="nav">
<li><a href="#">Home</a> </li>
<li><a href="#">Site</a> </li>
<li><a href="#">Other</a> </li>
</ul>
</div>
<div class="main-content">
<!-- 面朝大海,春暖花开 -->
<h2 align="center">Spring Blossom</h2>
<img src="images/0001.jpg" height="150" width="150">
<img src="images/0003.jpg" height="150" width="150">
<img src="images/0004.jpg" height="150" width="150">
<hr/>
<ul>
<li><p class="article">From tomorrow on,</p></li>
<li><p class="article">write to each of my dear ones</p></li>
<li><p class="article">Telling them of my happiness</p></li>
</ul>
</div>
<div class="footer">
&copy; Renld
</div>
</body>
</html>

总结

  1. 又开始写实验报告的感觉QAQ……
  2. 引入CSS文件记得加stylesheet
  3. 不同div 对于class不同于是CSS文件的渲染也不同,一般分成header, main-contentfooter
  4. <hr/>是大下线—对应markdowm中---
  5. 图片后面的属性记得调height和weight,另外我似乎记得html有网格框架
  6. 标签可以内嵌
文章目录
  1. 1. 最终成果
  2. 2. 我的代码
  3. 3. 总结