How can I override inline styles with external CSS?

前端 未结 6 1569
庸人自扰
庸人自扰 2020-11-22 05:52

I have markup that uses inline styles, but I don\'t have access to change this markup. How do I override inline styles in a document using only CSS? I don\'t want to use jQu

6条回答
  •  不思量自难忘°
    2020-11-22 06:23

    You can easily override inline style except inline !important style

    so

    Hello World, How Can I Change The Color To Blue?
    div { color: blue !important; /* This will Work */ }

    but if you have

    Hello World, How Can I Change The Color To Blue?
    div { color: blue !important; /* This Isn't Working */ }

    now it will be red only .. and you can not override it

提交回复
热议问题