What is the difference between the css partial value attribute selector and the dot class name notation
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!