导航,头部,CSS基础

1、制作自己的导航条。

 

<nav style="background-color: cyan">

    <a href="" target="_blank" ><img src="http://www.gzcc.cn/2016/images/footer1-logo.png" id="logo" alt="logo"></a>
    <a href="" target="_blank"><button type="submit" style="background-color: cyan">首页</button></a>
    <button type="submit" style="background-color: cyan">信息学院</button>
    <button type="submit" style="background-color: cyan">外国语学院</button>
    <button type="submit" style="background-color: cyan">会计学院</button>
    <button type="submit" style="background-color: cyan">旅游学院</button>
    <input type="text" id="select"placeholder="学院搜索">
    <button type="submit" style="background-color: cyan">搜索</button>
</nav>

 

2、HTML头部元素:

     <base>  定义了页面链接标签的默认链接地址

     <style>  定义了HTML文档的样式

     <link>  定义了一个文档和外部资源之间的关系

 

<head>
    <meta charset="UTF-8">
    <title>Welcome to GZCC</title>
    <base href="http://www.gzcc.cn/" target="_blank">
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">
        .背景天蓝色 {
            background-color: cyan;
        }

        button {
            font-size: 12px;
        }
        h1{
            front-size:45px
            color: red;
        }
        #H1{
            front-size:30px
        }
    </style>
</head>

 

3、练习样式表:

    行内样式表

    内嵌样式表

    外部样式表

 

<body>
     <p>十九大,习</p>
    <p>十九大,习</p>
    <p class="mu">十九大,习</p>
    <h1 ><span id="ha">十九大,习</span></h1>

</body>

 

4、分别练习定义三类选择器:

    HTML 选择器

    CLASS 类选择器

    ID 选择器

  p{
            color: blueviolet;
        }
        .mu{
            color:red ;
        }
        #ha{
            background-color:darkslategray;
        }

 

posted @ 2017-10-19 21:58  018林彬  阅读(157)  评论(0编辑  收藏  举报