- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
在javascript window.print 函数中,如何去除页脚中的url 但仍然包含页码?这是我的结果页面。 我希望 url 消失但页码保持不变,无论如何我可以实现吗?似乎这段代码不起作用。
<style type="text/css" media="print">
@page {
size: landscape; margin:0 0 10mm 0 ;float: none !important;
}
a {
display: none;
}
最佳答案
您可以使用 CSS 轻松实现这一目标。对于这个答案,我们没有使用@page,这是一个纯 CSS 答案,但在 FireFox 20+ 版本中工作。这是示例的链接。
#content {
display: table;
}
#pageFooter {
display: table-footer-group;
}
#pageFooter:after {
counter-increment: page;
content: counter(page);
}
<div id="content">
<div id="pageFooter">Page </div>
multi-page content here...
</div>
这样您就可以通过编辑#pageFooter 的参数来自定义您的页码。
我的例子:
#pageFooter:after {
counter-increment: page;
content:"Page " counter(page);
left: 0;
top: 100%;
white-space: nowrap;
z-index: 20px;
-moz-border-radius: 5px;
-moz-box-shadow: 0px 0px 4px #222;
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
}
希望这个技巧能帮到你。
你可以用这个
@page {
@bottom-right {
content: counter(page) " of " counter(pages);
}
}
关于Javascript窗口打印页脚只打印页码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45003867/
我有一个 html 代码,当我使用 html2pdf 将其转换为 pdf 时,它比单个页面长,我需要将页码放在两个页面中。 我试过把 page_footer 代码放在这篇文章中说的:html2pdf
我有这样的东西: (忽略代码的丑陋)。 xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function(){ if (xmlh
我正在尝试从 The Wealth of Nations 的在线版本中提取文本并创建一个数据框,其中每个观察结果都是书中的一页。我以一种迂回的方式来做,试图模仿我在 R 中所做的类似的事情,但我想知道
我正在为由 Python-PPTX 生成的幻灯片制作自定义目录。对于已经设置好的幻灯片、页脚和幻灯片编号,我已经可以在生成的 PPTX 中查看它。我相信幻灯片编号已经存在,只需要阅读。 我的问题是,幻
我正在寻找一种工具或服务,它可以抓取具有大量页面的网络域,创建站点地图,然后以有助于我查看、理解和分组内容的方式可视化该 map (我是新手站点)像 TreeView 或其他标准站点地图可视化之类的东
所以我有一个像这样分组的 slider : slide content slide content slide content slide content s
当我在文档正文中获得特殊标记时(例如,当我获得 时,我希望下一页页脚显示“第 1 页 x”时,我尝试重置页码)其中 x 是下一个分页符之前的页数) 事实上,它应该与我分割正文文档并单独转换它完全相同
我正在开发一个图书阅读器 iOS 应用程序,并使用 webview 显示 epub 图书。我用于解析 epub 图书的第 3 方库是“KFEpubKit”。 我必须为用户提供调整字体大小的选项(如在
我正在创建一个基于 Web 的教程,其中包含多个页面的模块。我在每个页面的底部都有页码(xx of yy,例如“01/12”),使用 html div 和 css。我有一个 java 包装器,但无法弄
我正在使用 PDFBox,成功地从 PDF 中检索字段坐标。继续处理多页 PDF,我遇到了这样的情况:我需要确定这些字段来自哪个页面,此外还需要将坐标从自下而上转换为自上而下。我已经阅读了文档的许多页
我使用以下代码对 UIWebView 进行分页。 self.webView.paginationMode = UIWebPaginationModeLeftToRight; self.webView.
有没有办法向新创建的幻灯片添加页码,并继承上一张幻灯片的样式? XMLSlideShow slideShow = new XMLSlideShow(new FileInputStream("templ
据我所见,CodeIgniter 的分页计算页面的方式是错误的,因为我的分页看起来像这样: 1 2 3 > 很好,问题出在每个分页号码 url 中,除了第一个: 分页中的编号 2 具有以下 url:
我一直在玩这个库,但运气不好。我想提取下面的文字 1196 页。我怎样才能使用这个库来做到这一点? 最佳答案 好吧,经过几次尝试,我确实设法得到了那个文字页面,所以我要分享这个。所以从技术上讲,文字
有没有办法获得搜索查询下一页的结果?当我提供页面参数时,我从 iTunes 得到相同的结果: https://itunes.apple.com/search?country=us&limit=200&
在我的 XSL-FO 中:我需要在页脚中显示页码。 我的页面布局通常是:第 1、2、3、4、5 页。 有时第 2 页会被 2a 和 2b 替换,因此流程应该是:1、2a、2b、3、4、5。 第 2a
我有一个格式问题,我的 html 表格的标题位于每一侧(我可以和谁住在一起),但它看起来很糟糕(如下图)。然后我不想在 PDF 文件中插入页码(我不知道该怎么做)。 我的 JavaScript fun
我正在使用 Java 中的 iText 创建一些 PDF 报告。根据要求,我应该做的是按照page_number/page_numbers_in_total格式对页码进行编号。 但是,内存操作给我的项
我有这段代码,它根据按钮单击从服务中获取数据。当我单击上一个或下一个按钮时,我想要什么,我想更改数据表底部的页码。 $('.paginate_button.previous', this.api().
我将查看器托管在我的本地网络服务器上,iframe 指向并加载 pdf。 然后我想按下一个按钮,将页码“记录”到一个文本文件中,我读到 this似乎建议您可以使用 pdf.getPage 获取页码的问
我是一名优秀的程序员,十分优秀!