Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the difference between the css partial value attribute selector and the dot class name notation

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you the "css partial value attribute selector and dot class name notation what is the difference", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "css partial value attribute selector and dot class name notation is what the difference is" this article.

This selector is equivalent to the dot class name notation we discussed in the class selector.

That is, p.important and p [class= "important"] are equivalent when applied to HTML documents.

So why is there a "~ =" property selector? Because it can be used for any property, not just class.

For example, you can have a document that contains a large number of images, only some of which are pictures. To do this, you can use a partial property selector based on the title document to select only these images:

Img [title~= "Figure"] {border: 1px solid gray;}

This rule selects all images where the title text contains "Figure". Images that do not have a title attribute or do not contain "Figure" in the title attribute will not match.

The above is all the content of this article entitled "what is the difference between css partial value attribute selector and dot class name notation". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report