美文网首页
css attribute selector 属性选择器

css attribute selector 属性选择器

作者: 邱杉的博客 | 来源:发表于2017-08-31 21:46 被阅读0次

attribute selector

The CSS attribute selector matches elements based on the presence or value of a given attribute.
CSS 属性选择器匹配存在该属性或者属性为特定值的元素

  • [attr]
    Represents an element with an attribute name of attr.

  • [attr=value]
    Represents an element with an attribute name of attr whose value is exactly value.

  • [attr~=value]
    Represents an element with an attribute name of attr whose value is a whitespace-separated list of words, one of which is exactly value.

  • [attr|=value]
    Represents an element with an attribute name of attr whose value can be exactly value or can begin with value immediately followed by "-" (U+002D). It is often used for language subcode matches.

  • [attr^=value]
    Represents an element with an attribute name of attr whose value is prefixed (preceded) by value.

  • [attr$=value]
    Represents an element with an attribute name of attr whose value is suffixed (followed) by value.

  • [attr*=value]
    Represents an element with an attribute name of attr whose value contains at least one occurrence of value within the string.

  • [attr operator value i]
    Adding an i (or I) before the closing bracket causes the value to be compared case-insensitively (for characters within the ASCII range).

相关文章

  • css attribute selector 属性选择器

    attribute selector The CSS attribute selector matches ele...

  • CSS基础

    CSS语法 selector {property: value}即 选择器{属性:值}学习css即学些有哪些选择器...

  • CSS 之 选择器

    CSS的常见选择器 一、简单选择器 Simple Selectors 二、属性选择器 Attribute Sele...

  • CSS系列知识(一)

    css的语法 selector {property: value} 即 选择器{属性:值} 学习css即学习有哪些...

  • CSS选择器常见的有哪几种?

    CSS选择器常见的有哪几种? 一、简单选择器 Simple Selectors 二、属性选择器 Attribute...

  • web开发笔记-css介绍(2)

    简介 今天是web开发笔记-css介绍(1)后续介绍. 内容 属性选择器[attribute], 匹配所有指定属性...

  • css3总结

    CSS的定义是由三个部分构成:选择器(selector),属性(properties)和属性的取值(value)选...

  • 18日作业

    1 CSS 语法由三部分构成:选择器、属性和值。selector {property: value}选择器 (se...

  • CSS语法

    选择器(selector):使用选择器来选择需要添加样式的标签。CSS属性(property):给选择的标签添加什...

  • css HACK

    一、IE6 css hack: html Selector {} / Selector 表示 css选择器 下同...

网友评论

      本文标题:css attribute selector 属性选择器

      本文链接:https://www.haomeiwen.com/subject/uivcjxtx.html