• div+css笔记


    1、行内样式

      <div style="height:100px; 100px; border:1px solid red;"></div> 

    2、内嵌式

    <head>

      <style type="text/css">

        div{

        100px;

        height:100px;

        border:1px;}    -----------标签选择器           

        .c1{

        10px;

        height:10px;} ------------类选择器 ( <div class="c1"></div>),可以多个标签共用一个class,  class=c1 c2; c2会覆盖c1相同的样式

        #d1{

          100px;

        height:100px;}------------id选择器(<div id="d1"></div>)

      </style>

    </head>

      *优先级 id>class>标签   行内优先级最高

    3、链接式

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

    4、导入样式(淘汰)

     <style>

      @import url(css/1.css)

     </style>

     *css注释方法  /*    */

    5、字体样式

    font-size 字体大小 font-family 字体样式  font-weight 字体加粗  color 字体颜色

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

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

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

        *css具有继承性,但不是所有的样式都继承

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

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

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

    Letter-spacing (默认为normal)  字母间距

    对齐方式

    text-align:left; 居左     right居右  center居中

     *垂直居中 line-height等于height

      

  • 相关阅读:
    hash
    DatabaseLibrary -数据库操作
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 18-22: ordinal not in range(128)
    robotframework_酷我音乐_That Girl
    robotframework_百度登陆
    12306_车票预定_修改日期
    基础知识:索引和分片
    基础知识:字符串
    基础知识: 常用数据类型分类 及 数值
    c++拷贝构造函数
  • 原文地址:https://www.cnblogs.com/classroom/p/4836050.html
Copyright © 2020-2023  润新知