导航,头部,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头部元素:

  1. <base>  定义了页面链接标签的默认链接地址
  2. <style>  定义了HTML文档的样式
  3. <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.练习样式表:

(1)行内样式表

(2)内嵌样式表

(3)外部样式表

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

(1)HTML 选择器

(2)CLASS 类选择器

(3)ID 选择器

<!DOCTYPE html>
<html lang="en">
<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>
<nav class="背景天蓝色">

    <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" class="背景天蓝色">首页</button>
    </a>
    <button type="submit" class="背景天蓝色">信息学院</button>
    <button type="submit" class="背景天蓝色">外国语学院</button>
    <button type="submit" class="背景天蓝色">会计学院</button>
    <button type="submit" class="背景天蓝色">旅游学院</button>
    <input type="text" id="select" placeholder="学院搜索">
    <button type="submit" class="背景天蓝色">搜索</button>
</nav>
<body>
<div id="container" class="背景天蓝色" style=" 350px" align="center">
    <div id="header" class="背景天蓝色"><h3 align="center">登录广州商学院</h3></div>
    <div id="content">
        <from action="">
            账号:<input type="text" name="user" placeholder="账号"><br>
            密码:<input type="password" name="password" placeholder="密码"><br>
            <input type="radio" name="role" value="学生">学生
            <input type="radio" name="role" value="老师">老师
            <br>
            <input type="button" value="登录" onlick="alert">
            <input type="button" value="注册" onlick="alert">
            <br>
            <a href="https://www.baidu.com/" target="_blank">忘记密码?</a>
        </from>
    </div>
    <div id="footer" style="background-color: cyan"><h6 align="center">版权归广州商学院所有</h6></div>
</div>
<h1>广州商学院预祝中共十九大胜利召开</h1>
<h2 id="H1">号召全体师生深刻学习十九大精神</h2>
</body>
</html

原文地址:https://www.cnblogs.com/951111ldj/p/7695107.html