How can I inspect and tweak :before and :after pseudo-elements in-browser?

后端 未结 7 2113
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 23:13

I have created some fairly elaborate DOM elements with an :after pseudo-element, and I\'d like to be able to inspect and tweak them in either Chrome Inspector or Firebug or

7条回答
  •  一个人的身影
    2020-12-04 23:33

    As of Chrome 31 pseudo elements show in the elements panel as child elements of their parent as shown in the following image:

    Screenshot

    You can select them as you would a normal element but if you remove the content style then the pseudo element will also be removed and the devtools focus will change to it's parent.

    It appears that inherited CSS styles are not viewable and you can't edit CSS content from the elements panel.

提交回复
热议问题