最新消息:欢迎来到我的小站

HTML 打印或者生成pdf实现换页

css Terry 1097浏览 6评论

打印 HTML 无法强制换页其实是一件很令人困扰的事,要达到这个功能其实可以透过 CSS 的 Pagebreak 来处理。
强制分页有大概只有二种用的到:

/*在标签后换页*/
{ page-break-after: always;} 
/*在标签前换页*/
{ page-break-before: always;}

实例

<div STYLE=”page-break-after: always;”> 第一页 </div> 第二页

转载请注明:Terry's blog » HTML 打印或者生成pdf实现换页

与本文相关的文章

  • 暂无相关文章!
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (6)

  1. The information and facts mentioned inside the write-up are a few of the best offered.
  2. Sites of interest we have a link to.
  3. The time to read or take a look at the subject material or web sites we have linked to beneath.
  4. Below youll obtain the link to some internet sites that we believe you ought to visit.
  5. Just beneath, are several completely not connected sites to ours, nevertheless, they may be surely worth going over.
  6. Sites of interest we've a link to.