在列印網頁時,我該如何隱藏一個元素?
要隱藏元素,在元素中新增 "display:none",使用 CSS。
<style>
@media print {
.noprint {
visibility: hidden;
}
}
</style>同時,新增你想隱藏在 <div>− 中的元素
<div id="noprint"> Add here the element, which you want to hide. </div>
廣告
要隱藏元素,在元素中新增 "display:none",使用 CSS。
<style>
@media print {
.noprint {
visibility: hidden;
}
}
</style>同時,新增你想隱藏在 <div>− 中的元素
<div id="noprint"> Add here the element, which you want to hide. </div>