css attribute selector

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

1.[class~="flower"]: Select the class with flower

class="flower ss"

class="ss flower"

2.[class|='top']: Select a class starting with top and need to be connected with '—' or a separate top

class="top-ss"

class="top"

 class="top-ss"//Cannot be selected

3.[class^="top"]: Select top starting with top regardless of whether there are special symbols connected to it, or top alone can also be used

class="top-ss"

class="topss"

4.[class$="top"]: Select the class ending with top, top alone is also OK

class="mytop"

class="my-top"

class="top"

5.[class*='tt']: Select the class with the two letters tt regardless of its position

class="sttd"

class="ttee"

class="eett"

6.[target=_blank]

Target =_blank is selected in the a tag

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template