how to overwrite inline styles in print css?
i know, inline styles are "evil", but ther开发者_运维百科e are inserted in html with javascript (jQuery animation). so, is it possible?
This:
<div style="background: red;">
The inline styles for this div should make it red.
</div>
Can be overridden with:
div[style] {
background: yellow !important;
}
You can add !important
to any css property
Try putting !important between the value and the semi-colon in your print stylesheet:
body {
background-color: #0f0 !important;
}
精彩评论