Hao小這邊提供三個方法:
- 用快捷鍵
- 用google chrome 開發人員工具(MAC快捷指令Option + Command(
) + I)、(Windows快捷指令Ctrl + Shift + I)
- 用JavaScript或JQuery
//script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//$('.className') 或 jQuery('.className') | |
//強制下拉選單on hover | |
$('.Menu').trigger('mouseenter'); | |
//強制add class 讓選單display | |
jQuery(".sub-menu ").addClass('menushow'); | |
/* CSS menushow | |
#topmenu .menushow { | |
display: block; | |
} | |
*/ |