Hide a div in a page and make it visible only on print bootstrap 3 MVC 5

前端 未结 1 1708
予麋鹿
予麋鹿 2021-02-13 05:59

There is a web page showing information to the user. If the user decides to print it I want to include additional information that is not required on the screen, but would be he

相关标签:
1条回答
  • 2021-02-13 06:44

    I think the fact you've used

    hidden-lg hidden-md hidden-sm hidden-xs
    

    across the div means you've effectively hidden it across all viewports. To simply hide or show a div for print use the following:

    <div class="hidden-print">content for non print</div>
    
    <div class="visible-print">content for print only</div>
    
    0 讨论(0)
提交回复
热议问题