scale html table before printing using css

后端 未结 3 1536
死守一世寂寞
死守一世寂寞 2020-12-25 12:55

I have a table as the entire content of an HTML document (for legitimate table purposes...it is table data, not for layout). Some cells have widths and heights specified (n

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-25 14:01

    You should use the media types

    @media print {
        body {transform: scale(.7);}
        table {page-break-inside: avoid;}
    }
    

    So, this styles will by applying only in print preview mode. http://www.w3.org/TR/CSS21/media.html

提交回复
热议问题