• CSS权威指南(第3版)


    第一章 基础介绍

    介绍了css的好处, 编辑一个文件多处使用, 层叠: 指式样有矛盾时, 可以覆盖掉之前的式样, 便于维护 等等.

    块级元素:会生成一个元素框, (默认地)它会填充其父元素的内容区, 会换行.

    行内元素: 也有元素框, 但是不会打断这行文本, 不换行.

    <link rel=”stylesheet” type=”text/css” href=”sheet1.css” media=”all” />

    候选式样表 将 rel设置为 alternate stylesheet 例如:

    <link rel=”stylesheet” type=”text/css” href=”sheet1.css” title=”Default”>  // 默认式样

    <link rel=”alternate stylesheet” type=”text/css” href=”bigtext.css” title=”big Text”>

    <link rel=”alternate stylesheet” type=”text/css” href=”smalltext.css” title=”small text”>

    如果多个式样表, 都使用”默认式样表”, 那么浏览器只会选择一个

    <style type=”text/css”> @import url{style.css}</style>

    可以看到 @import 必须写在 style 容器中. 并且要在最前边.

    @import 与 link 类似, @import url(sheet2.css);

    如果一个式样表, 需要引用令一个式样表, 那么这个 @import 就很有用了

    内联式样一般最好不要使用, 就是<style type=”text/css”></style> 在body中.

    第二章 选择器

    类选择器, 根据类别选择, 比如同样都是 <input> 标签, 但是类别不同式样不同.

    id选择器, 用来唯一确认一个元素

    属性选择器, 针对一些不同类型或相同类型, 但是属性相同的, 具有相同式样.

    伪类, 指实际上不存在的元素, 一般用在<a>中, 也可以用在别的元素上

    a:visited {color: ilver;}

    input:focus {background: silver;}

    伪元素, 插入假想的元素, css2 中只支持4个伪元素: 设置首字母式样, 设置第一行式样, 设置之前和之后式样.

    p:first-letter {color: red;}

    p:first-line {color: red;}

    第三章 结构和层叠

  • 相关阅读:
    remote access mongodb in docker
    using maven plugins to push spring boot image into remote repository
    docker registry 2 with tls and basic authentication
    docker-compose + spring boot + mysql + redis + nginx 发布web应用: part 3
    docker-compose + spring boot + mysql + redis + nginx 发布web应用: part 2
    docker-compose + spring boot + mysql + redis + nginx 发布web应用: part 1
    The English tense table
    Sdn
    (2016.06.06)第6次作业
    (2016.5.10)第五次作业
  • 原文地址:https://www.cnblogs.com/moveofgod/p/3519139.html
Copyright © 2020-2023  润新知