How do I override CSS set on a pseudo element?

痴心易碎 提交于 2019-12-02 17:23:50
Sacha

As far as I can tell there is no other way than to override all properties. The styles are defined on the element, they won't just disappear because of another selector that targets the element.

If you only want to remove the pseudo element from the page you can do content: none.

Added from comments below:

The difference between content: "" and content: none is that content: "" produces a pseudo-element with no content (i.e. an empty pseudo-element), whereas content: none prevents the pseudo-element from being generated at all.

Here content: ""; doesn't effect at all if you want to remove that pseudo you have to use content:none; it will remove previously added pseudo content.

If that doesn't help you can also try :

display:none; 
//or 
display:none !important;

here is working jsfiddle

https://jsfiddle.net/ganeshswami99/52duu0x8/1/

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