【问题标题】:How to hide the navbar on page print (bootstrap 5)?如何隐藏页面打印上的导航栏(引导程序 5)?
【发布时间】:2022-07-08 22:53:11
【问题描述】:

我正在尝试打印页面正文,但垂直的“导航栏”仍然显示并覆盖了其中的一部分。

这是我用来在打印时隐藏导航栏的代码:

@@media print and (min-width: 800px){
            #print {
                display: none;
            }
        }

这是加载在 _Layout.cshtml 上的导航栏,作为局部视图:

<partial name="_MenuSidebarVerticalPartial"  id="print" />

【问题讨论】:

    标签: html css bootstrap-4


    【解决方案1】:

    你可以使用.d-print-none这个类。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-31
      • 1970-01-01
      • 2019-01-31
      相关资源
      最近更新 更多