问题
Is it possible to entirely disable any preconfigured @media print
css styles from bootstrap
without having to recompile it?
The print styles applied by default could be seen here: https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css#L6837
I want my webpage to be printed just as seen, with all css tags applied. Especially colors, like:
b {
color: #ff0000;
}
In order to disable the print styles from bootstrap, I'd have to explicit override every property again with my custom styles, eg:
b {
color: #ff0000 !important;
}
But isn't there a global way to disable these default print styles?
回答1:
You can download custom bootstrap without media print. http://getbootstrap.com/customize/
just uncheck
Print media styles
来源:https://stackoverflow.com/questions/35039452/disable-media-print-in-bootstrap