Viewing :hover State in Chrome Developer Tools
Unlike Firebug, which provides a dedicated style dropdown for selecting element states, Chrome Developer Tools offers a more subtle method for مشاهده:hover styles.
Solution:
To access the :hover rules and manipulate their states:
-
Enable Pseudo-class Display: Click the small ":hov" text in the top right of the Styles pane. This will display the :hover rules alongside the regular CSS rules.
-
Force :hover State: Right-click the desired element in the Elements panel and select ":hover" from the context menu. This will force the element into the hover state, allowing you to inspect its applied styles.
Additional Tips:
- For more keyboard shortcuts and features in the Elements panel, refer to the Chrome Developer Tools Shortcuts documentation.
- As an alternative, you can use the Chrome Extension "Toggle Element State" to quickly switch between different element states.
The above is the detailed content of How Do I View and Manipulate :hover Styles in Chrome DevTools?. For more information, please follow other related articles on the PHP Chinese website!