zoukankan      html  css  js  c++  java
  • 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

      

  • 相关阅读:
    敏捷开发方法综述
    RBAC权限控制系统
    Thinkphp 视图模型
    Thinkphp 缓存和静态缓存局部缓存设置
    Thinkphp路由使用
    Thinkphp自定义标签
    异步处理那些事
    Thinkphp 关联模型
    Thinkphp 3.1. 3 ueditor 1.4.3 添加水印
    数据库组合
  • 原文地址:https://www.cnblogs.com/classroom/p/4836050.html
Copyright © 2011-2022 走看看