WrittenCodeMore, you will find that you are getting increasingly ignorant, always think that html css is very simple, has mastered very skilled, in fact, I am still a lot worse.
I have never used CSS in this way.. A. B {display: block ;}You only need to check the internet.
Reference: http://www.w3school.com.cn/css/css_selector_class.asp
1. In HTML, a class value may contain a word list, separated by spaces. For example, if you want to mark a specific element as important and warning at the same time, you can write (the order of these two words does not matter, but can also be written as warning important):
<P class = "important warning"> This paragraph is a very important warning. </P>
Let's assume that all the elements whose class is important are in bold, while all the elements whose class is warning are in italic. All the elements whose class contains both important and warning have a silver background. You can write:
. Important {font-weight: bold;}. Warning {font-weight: italic;}. Important. Warning {Background: Silver ;}
2. By linking two class selectors, you can only select the elements that contain these class names at the same time (the order of class names is not limited ).
If a multi-class selector contains a class name that is not in the class name table, the matching fails. See the following rules:
. Important. Urgent {Background: Silver ;}
As expected, this selector will only match the P element containing the word important and urgent in the class attribute. Therefore, if the class attribute of a P element contains only the words important and warning, it will not match.HoweverIt can match the following elements:
<P class = "important urgent warning"> This paragraph is a very important and urgent warning. </P>