以下を使用して、いくつかの展開/折りたたみ div を実行しています
<div class="FAQ">
<a href="#hide1" class="hide" id="hide1">+</a>
<a href="#show1" class="show" id="show1">-</a>
<div class="question"> Question Question Question Question Question Question Question Question Question Question Question? </div>
<div class="list">
<p>Answer Answer Answer Answer Answer Answer Answer Answer Answer Answer Answer Answer Answer Answer Answer Answer Answer Answer </p>
</div>
</div>
CSS
/* source: http://www.ehow.com/how_12214447_make-collapsing-lists-java.html */
.FAQ {
vertical-align: top;
height:auto !important;
}
.list {
display:none;
height:auto;
margin:0;
float: left;
}
.show {
display: none;
}
.hide:target + .show {
display: inline;
}
.hide:target {
display: none;
}
.hide:target ~ .list {
display:inline;
}
ここで見つかった (および続き)純粋な CSS の折りたたみ/展開 div
私の問題は、Ctrl + pまたは関数printpageスクリプトを使用して、展開されたdivを印刷できないことです。
私はこの種のことは初めてで、答えは私を見つめているに違いないと感じています。print.css ファイルに追加して、少なくともクラス FAQ の機能を無視し、展開された div だけを印刷できない場合に非表示になっているものをすべて印刷するように強制できるものはありますか?
前もって感謝します。