导航,头部,CSS基础

  1. 制作自己的导航条。
  2. HTML头部元素:
    1. <base>  定义了页面链接标签的默认链接地址
    2. <style>  定义了HTML文档的样式
    3. <link>  定义了一个文档和外部资源之间的关系
  3. 练习样式表:
    1. 行内样式表
    2. 内嵌样式表
    3. 外部样式表
  4. 分别练习定义三类选择器:
    1. HTML 选择器
    2. CLASS 类选择器
    3. ID 选择器
 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>首页</title>
 6     <link rel="stylesheet"type="text/css"href="181.css">
 7 </head>
 8 
 9 <body>
10 <p>如果时间可以重来,人生是不是会不一样,内心的选择会不会也不一样呢</p>
11 <p class="textblue">如果时间可以重来,人生是不是会不一样,内心的选择会不会也不一样呢</p>
12 <h3><span id="commentcount">3869</span>评论</h3>
13 <nav>
14     <img src="https://p1.ssl.qhmsg.com/t01035228238b523bcc.jpg">
15     <a href="https://baike.so.com/doc/3106633-3274453.html"></a>
16     <input type="text">
17     <button type="submit">搜索</button>
18 </nav>
19 </body>
20 </html>

1 p{
2             color:blue;
3         }
4         textblue{
5             color:red;
6         }
7         #commentcount{
8             background-color:#FFD700;
9         }

 

 

 

posted on 2017-10-18 16:08  051刘佳铃  阅读(146)  评论(0)    收藏  举报