zoukankan      html  css  js  c++  java
  • css 伪类 属性选择器 优先级

    a标签:link visited active hover   其中active hover  focus selection可以用于任何标签   first-letter first-line  before after first-child last-child nth-child(2n)  first-of-type last-of-type nth-of-type   //even(2n) 偶数 odd(2n+1) 奇数

    span + p{} 表示span兄弟元素紧挨后一个p元素 span ~ p{} 表示span兄弟元素后所有p元素 

    p:not(.p1){} 表示所有的p元素但排除p属性class为p1的  :not(选择器)选择器 #id .class

    p[title]{} p标签有title属性的 

    p[title="ptitle"]{} p标签有title属性值为ptitle

    p[title^="pt"]{} p标签title属性值以pt开头的

    p[title$="pt"]{} p标签title属性值以pt结尾的

    p[title*="pt"]{} p标签title属性值包含pt的

    优先级:

    内联样式:1000

    id选择器:100

    类和伪类:10

    元素选择器:1

    通配符*: 0

    继承无优先级

    a元素伪类顺序: link visited hover active 

    特殊元素:em strong 强调 b 粗体 i 斜体 cite 引用  q 引号 sup 上标 sub 下标 del 删除线 ins 下画线 pre 预格式(code 代码格式)

  • 相关阅读:
    bzoj 1084: [SCOI2005]最大子矩阵
    Python之深浅拷贝
    2,版本控制git --分支
    1,版本控制git--仓库管理
    python-openpyxl操作excel
    ansible-3
    ansible-2
    ansible-1
    celery
    6,MongoDB 之 Array Object 的特殊操作
  • 原文地址:https://www.cnblogs.com/howhy/p/15469929.html
Copyright © 2011-2022 走看看