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

About the analysis of css attribute selectors

不言
不言Original
2018-06-20 17:46:192798browse

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"

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"//选不中

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"

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 class regardless of its location

 class="sttd"
  class="ttee"
  class="eett"

6.[target=_blank]

a标签中有target =_blank的选中

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!

Statement:
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