2
我實現了一個打印functionallity在我的網站,我想通過量角器/硒進行測試。如何用量角器或硒測試@media打印?
還有就是「應用」是在測試過程中@media print
下樣式的任何方法?
我只看到一個相關question,但它沒有任何好的答案。
例如在該樣本我想的#hidden
DIV將在測試過程中被顯示。
.print-only {
display: none;
}
@media print {
.print-only {
display: block;
}
}
<div id="hidden" class="print-only">Will be shown when printing</div>