css 属性选择器

WBOY
Release: 2016-07-21 14:53:02
Original
1000 people have browsed it

1.[class~="flower"]:选中有flower的class

  class="flower ss"

  class="ss flower"

2.[class|='top']:选择以top为top开头的class需要有'—'相连 或者单独的top

  class="top-ss"

  class="top"

class="top-ss"//选不中

3.[class^="top"]:选中以top为开头的不管有没有特殊符号相连,单独的top也可以

  class="top-ss"

  class="topss"

4.[class$="top"]:选中以top为结束的class,单独的top也行

  class="mytop"

  class="my-top"

  class="top"

5.[class*='tt']:选中有tt两个字母的class不管其位置在哪里

  class="sttd"

  class="ttee"

  class="eett"

6.[target=_blank]

a标签中有target =_blank的选中

7.input[type="button"]

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!