Bootstrap 4 CSS causing Chrome's print “Layout” to disappear

时光总嘲笑我的痴心妄想 提交于 2019-12-23 07:04:26

问题


I want my website users to be able to print pages in either portrait or landscape mode.

When printing from Google Chrome using Bootstrap 3.3.7, the Chrome print settings has a Layout option. Simply changing the css/js to 4.0.0, the Chrome print settings no longer has the Layout option. I suspect this has something to do with one of these CSS directives:

@page
@media

回答1:


I was able to fix this by adding this CSS:

@page {
    size: auto;
}


来源:https://stackoverflow.com/questions/49018636/bootstrap-4-css-causing-chromes-print-layout-to-disappear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!