Home > Web Front-end > CSS Tutorial > About the analysis of css attribute selectors

About the analysis of css attribute selectors

不言
Release: 2018-06-20 17:46:19
Original
2841 people have browsed it

The following article brings you a comprehensive understanding of css attribute selectors. The content is quite good, so I will share it with you now and give it as a reference.

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

class="flower ss"
  class="ss flower"
Copy after login

2.[class|='top']: Select the class that starts with top and must have '—' connected or separate top

 class="top-ss"
  class="top"
  class="top-ss"//选不中
Copy after login

3.[class^="top"]: Select top as the beginning regardless of whether there are special symbols connected, a separate top can also be used

class="top-ss"
  class="topss"
Copy after login

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

 class="mytop"
  class="my-top"
  class="top"
Copy after login

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

 class="sttd"
  class="ttee"
  class="eett"
Copy after login

6.[target=_blank]

a标签中有target =_blank的选中
Copy after login

7.input[type="button"]

The above is the entire content of this article, I hope it will be helpful to everyone’s learning. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

About the analysis of CSS3 positioning and floating

About the use of the currentColor keyword in CSS3

The above is the detailed content of About the analysis of css attribute selectors. For more information, please follow other related articles on the PHP Chinese website!

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