我有一个引导CSS /打印的问题。
在引导CSS(reset.css)中,所有内容都被清除以进行打印
- @media print {
- * {
- text-shadow: none !important;
- color: black !important;
- background: transparent !important;
- Box-shadow: none !important;
- }
- }
但是我必须打印几行颜色。我的表看起来像这样:
- <div class="container">
- <div id="task-summary">
- <div id="process-summary">
- <table class="table table-condensed">
- <tbody>
- <tr class="success">
- <td>
我将其嵌入到我的代码中,但它不起作用:
- @media print {
- #task-summary{
- .success{
- background-color: #DFF0D7 !important;
- }
- }
- }
我已经尝试过,如果css被除了使用display:none ..它的作品(行不显示),似乎在正确的地方。
有人有一个想法,我如何可以设法覆盖bootstrap css命令,而不必编辑boot.cap的引导?
问Jabbawock
解决方法
- @media print {
- .success {
- background-color: #DFF0D7 !important;
- }
- }
要么
- @media print {
- #task-summary .success {
- background-color: #DFF0D7 !important;
- }
- }
要么
- @media print {
- #task-summary > #process-summary .success {
- background-color: #DFF0D7;
- }
- }