Hide form controls when printing an HTML page with CSS

后端 未结 6 847
被撕碎了的回忆
被撕碎了的回忆 2021-02-12 12:20

Certain HTML form elements have extra UI attached to them, like the up/down arrows on number. When printing the page however, those buttons are no longer needed, as

6条回答
  •  故里飘歌
    2021-02-12 12:53

    An alternative would be to provide a link to print, and have another copy of the page without all the extra stuff

    ie:        www.something.com/page.htm
    printpage  www.something.com/page-print.htm
    

    this is the most common practice (also, you can reuse css with the print only parts in it)

    hope that helps

提交回复
热议问题