• 20150917-css


    一、什么叫做CSS样式?

    (1)CSS (Cascading Style Sheet)叠层样式表。用于控制网页样式并允许将样式信息与网页内容分离的一种标记性语言。

    (2)CSS有四种控制方法:行内样式、内联样式、链接式、导入式  

    (注:按就近原则排列)

    1、行内样式

    <body>

        <div style="color:red";></div>

    </body>

    2、内联样式

       <head>

          <title>这是内联</title>

               <style type="text/css">

                       div{

                          color:red;

                          }

              </style>

       </head>

    3、链接式

    <link rel="stylesheet" type="text/css" href="base.css"/>

    4、导入式:(很少使用了)

    <style>

      @import url(base.css)

    </style>

    CSS选择器:

    1、标签选择器

           div{

               200px;

               height:300px;

               color:red;

     }

    <div>...</div>

    2、id(#)选择器(具有唯一性)

         #c1{

         200px;

         height:300px;

         color:red;

    }

    <div id="c1">...</div>

     3、class(.)选择器

      .d1{ 

      200px;

         height:300px;

         color:red;

    }

    <div class="d1">...</div>

    优先级:标签选择器<  class < id

    css注释符号:/* css内容 */

    二、css字体效果:

      文字大小:font-size:14px

      字体: font-family:"微软雅黑"

      字体颜色: color:#FF0000;

      文字粗细:font-weight:bold;

      文字下划线、删除线、定划线

      Text-decoration:underline /*下划线*/

      Text-decoration:overline /*顶划线*/

      Text-decoration:line-through; /*删除线*/

  • 相关阅读:
    re
    jieba
    Normalization的作用,LN,BN,WN
    RBF神经网络
    其他论文
    numpy, pandas,collections.Counter
    tensorflow 相关
    机器翻译(machine translation)相关
    2020 weblogin rce CVE-2020-14882 漏洞利用POC
    CVE-2021-3019 漏洞细节纰漏
  • 原文地址:https://www.cnblogs.com/zhangjx/p/4823819.html
Copyright © 2020-2023  润新知