How to inspect CSS element using chrome?

我与影子孤独终老i 提交于 2019-11-27 18:34:44

问题


I am trying to figure out how to inspect an element using Chrome. Now I know how to inspect an element, but how do I inspect a button's functions, like hover and active as well.

I am trying to inspect the Youtube's sign-in button on the top left of the page. I got the hover attributes, but how do I inspect the link and active state attributes?


回答1:


When you're inspecting the element, in the styles tab, there's a "toggle element state" button. Click it to apply various pseudo-states:




回答2:


Just right click anywhere on a page and choose "Inspect element" from the menu. Chrome has a graphical tool for debugging (like in Firebug), so you can debug JavaScript or look at CSS (you can even temporarily change the CSS while you're there too)

For more information, see https://developers.google.com/chrome-developer-tools/



来源:https://stackoverflow.com/questions/12428364/how-to-inspect-css-element-using-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!