在引导程序中禁用@media打印? [英] Disable @media print in bootstrap?
问题描述
是否可以从 bootstrap
中完全禁用任何预配置的 @media print
CSS样式,而不必重新编译它?
Is it possible to entirely disable any preconfigured @media print
css styles from bootstrap
without having to recompile it?
可以在此处看到默认应用的打印样式: https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css#L6837
The print styles applied by default could be seen here: https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css#L6837
我希望我的网页能像看到的那样打印,并应用所有css标签.尤其是颜色,例如:
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?
推荐答案
您可以下载自定义引导程序,而无需打印媒体. http://getbootstrap.com/customize/
You can download custom bootstrap without media print. http://getbootstrap.com/customize/
只需取消选中
印刷媒体样式
这篇关于在引导程序中禁用@media打印?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!