CSS matches multiple classes The following HTML tag li, class has open style. My requirement is to change the background color to white only when open and active exist at the same time <li id="menu_268098" title="Account Information Query" class="open"> <li id="menu_270008" class="nav_sec" title="Account Balance Query"> <a href="#/p/payment.search.account_balance" class="dropdown-toggle"> <span class="nav-title">Account Balance Inquiry</span> </a> </li> </ul> </li> <li id="menu_268098" title="Account Information Query" class="open active"> <li id="menu_270008" class="nav_sec" title="Account Balance Query"> <a href="#/p/payment.search.account_balance" class="dropdown-toggle"> <span class="nav-title">Account Balance Inquiry</span> </a> </li> </ul> </li> The css can be written like this: li.open.active{ background-color: #fff; } Note: There should be no space between .open.active Summarize This is the end of this article about how to match multiple classes in CSS. For more information about how to match multiple classes in CSS, please search previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! |
<<: Fixed table width table-layout: fixed
>>: 5 Reasons Why Responsive Web Design Isn’t Worth It
There are two ways to disable form submission in ...
mysql installer community 8.0.16.0 installation g...
MySQL versions are divided into Enterprise Editio...
The following attributes are not very compatible w...
background The Agile model is widely used, and te...
I wrote a jsp page today. I tried to adjust <di...
After reading some articles, I finally figured ou...
Requirement: Celery is introduced in Django. When...
<!--[if lte IE 6]> <![endif]--> Visibl...
background: There is a flask project that provide...
Html semantics seems to be a commonplace issue. G...
When I switched my primary operating system from ...
1. Preparation Example: Two machines: 192.168.219...
This article shares the specific code of JavaScri...
MySQL provides two different versions for differe...