zoukankan      html  css  js  c++  java
  • 导航,头部,CSS基础

    1、制作自己的导航条。

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>简书</title>
        <link rel="stylesheet" href="1018.css">
    </head>
    <body>
    <nav>
        <img src="https://p1.ssl.qhmsg.com/dr/270_500_/t01745b3fd4078d5a9e.jpg?size=512x512" height="50" width="50">
        <a href="http://www.jianshu.com/"></a>
        <input type="text" name="search">
        <button type="submit">搜索</button>
        <a href="https://www.jianshu.com/sign_in">登陆</a>
        <a href="https://www.jianshu.com/sign_up">注册</a>
    </nav>

    2、HTML头部元素:

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

    <base href="" target="_blank">

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

        <style type="text/css">
            p{
                color: red;
            }
        </style>

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

    <head>
        <meta charset="UTF-8">
        <title>简书</title>
        <link rel="stylesheet" href="1018.css">
    </head>

    3 练习样式表:

    行内样式表

    内嵌样式表

    外部样式表

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>简书</title>
        <link rel="stylesheet" type="text/css" href="1018.css">
        <style type="text/css">
          p{
          color: red;
        }
          .zidingyi{
             color: blue;
        }
        #commentcount{
              background-color: aquamarine;
        }
        </style>
    </head>
    <body>
    <nav>
        <img src="https://p1.ssl.qhmsg.com/dr/270_500_/t01745b3fd4078d5a9e.jpg?size=512x512" height="50" width="50">
        <a href="http://www.jianshu.com/"></a>
        <input type="text" name="search">
        <button type="submit">搜索</button>
        <a href="https://www.jianshu.com/sign_in">登陆</a>
        <a href="https://www.jianshu.com/sign_up">注册</a>
    </nav>
    <p>十九大 <span style="background: black;font-size: 30px;font-family: 微软雅黑">召开</span></p>
    <p>十九大召开</p>
    <p>十九大召开</p>
    <p>十九大召开</p>
    <h1 class="zidingyi">评论</h1>
    <h2><span id="commentcount" >1000</span>点赞</h2>
    </body>
    
    </html>

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

      1. HTML 选择器
      2. CLASS 类选择器
      3. ID 选择器
    复制代码
    {#        1  .HTML 选择器#}
            p {
                color: blue;
            }
    {#        2  .CLASS 类选择器#}
            .bk{
                color: lavenderblush;
            }
    {#        3  .ID 选择器#}
            #ok {
                color:  lightseagreen;
            }
  • 相关阅读:
    五.hadoop 从mysql中读取数据写到hdfs
    四.idea本地调试hadoop程序
    eclipse 中运行 Hadoop2.7.3 map reduce程序 出现错误(null) entry in command string: null chmod 0700
    hadoop HDFS常用文件操作命令
    三.hadoop mapreduce之WordCount例子
    Maven学习之(三)Maven插件创建web项目
    Eclipse下把jar包放到工程lib下和通过buildpath加载有什么不同(解决找不到类的中级方法)
    Java ExecutorServic线程池(异步)
    Lo4j(二)级别和优化
    Lo4j(一)初识
  • 原文地址:https://www.cnblogs.com/lintingting/p/7689268.html
Copyright © 2011-2022 走看看