嗨我打算在打印时显示纯色背景色.
我用过
@media print {
height: 100%;
min-height:100%;
background: #CCC;
}
Run Code Online (Sandbox Code Playgroud)
并在Chrome和Safari中激活"打印背景图形".
但在最后一页下面有一个白点,因为该网站没有覆盖A4/Letter页面的100%高度.
相片:
第一页:看起来像预期的那样.

最后一页:下面是一个空的空白区域,我想填充颜色.

我在使用height: 100vhSafari for Mac 中的 CSS 设计需要 100% 屏幕高度的 Web 应用程序时遇到问题。
每次我打开一个新选项卡并返回到 Web 应用程序选项卡时,考虑到由于选项卡栏,浏览器现在的空间减少了大约 24 像素,因此不会调整大小。
任何想法来处理这个问题?
代码示例:
HTML文件:
<html>
<head>
<title>Safari Bug</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="app">
<h1>Safari bug instructions</h1>
<ol>
<li>Close all tabs in Safari except this page. (You will see a dark bar at the bottom with buttons)</li>
<li>Open a new tab.</li>
<li>Return to the tab. (If the bug appear, you no longer will see the buttons withouth scrolling)</li>
</ol>
<p></p>
<nav …Run Code Online (Sandbox Code Playgroud) 根据文档,Quill 可以处理 Enter 键,但我无法使其工作。
我已按照他们网站上列出的以下步骤进行操作:
const Keyboard = Quill.import('modules/keyboard'); Quill.js 扩展导入文档。 我的代码如下:
quill.keyboard.addBinding({
key: Keyboard.keys.ENTER,
handler: function(range, context) {
console.log('Enter Key!!!');
result.innerText = 'Key presset = ENTER';
}
})
我在 MacOS High Sierra 10.13.3 上尝试过 Chrome(最新版本)和 Safari 11.0.3