How can I override inline styles with external CSS?

前端 未结 6 1567
庸人自扰
庸人自扰 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:26

    The inline styles for this div should make it red.
    div[style] { background: yellow !important; }

    Below is the link for more details: http://css-tricks.com/override-inline-styles-with-css/

提交回复
热议问题