以下html標籤li,class有open樣式。個人需求是隻有當open,active同時存在時,修改背景色爲白色css
<li id="menu_268098" title="帳戶信息查詢" class="open"> <li id="menu_270008" class="nav_sec" title="帳戶餘額查詢"> <a href="#/p/payment.search.account_balance" class="dropdown-toggle"> <span class="nav-title">帳戶餘額查詢</span> </a> </li> </ul> </li>
<li id="menu_268098" title="帳戶信息查詢" class="open active"> <li id="menu_270008" class="nav_sec" title="帳戶餘額查詢"> <a href="#/p/payment.search.account_balance" class="dropdown-toggle"> <span class="nav-title">帳戶餘額查詢</span> </a> </li> </ul> </li>
css能夠這樣寫:html
li.open.active{ background-color: #fff; }
注意:.open.active之間不能夠有空格spa