I have a question about CSS selector syntax.
What is the difference between the following two CSS selectors?
.myclass1 .myclass2 { color: black; } .myclass1.myclass2 { color: black; }
Are they the same?
Thank.
.myclass1 .myclass2: select the element that has the class "myclass2" inside another element of the class "myclass1";
.myclass1 .myclass2
.myclass1.myclass2: Select an item that has both classes.
.myclass1.myclass2
.myclass1 .myclass2 will match the div's internal
<div class="myclass1"> <div class="myclass2"></div> </div>
.myclass1.myclass2 will match
<div class="myclass1 myclass2"></div>
Source: https://habr.com/ru/post/1779462/More articles:Debugging code in Delphi XE - debuggingOpenid - user data after authentication - authenticationWhat is the best way to learn the elevator if you do not have experience in web programming? - databaseDetecting Data Changes with Form Events - vbaDoes anyone know where and how I can install the VMWare Visual Studio plugin? - visual-studioXSS Protection ModSecurity Type 0 Attacks and Impacts - xssКак применить стиль css к классу, который не содержит подкласс - cssRails 3 - Nested Resources - Routing - ruby | fooobar.comPassing a function pointer as a template parameter - c ++How did Google set up an HTTP link when someone clicks a link to a search result? - javascriptAll Articles