大佬教程收集整理的这篇文章主要介绍了javascript – 为什么在我尝试打印网页时,每个打印页面中的内容都不重复?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
th span { transform-origin: 0 50%; transform: rotate(-90deg); white-space: nowrap; display: block; position: relative; top: 0; left: 50%; }
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous"> <table class="table table-bordered"> <thead> <tr> <th><span style="transform-origin: 0 50%; transform: rotate(-90deg); white-space: nowrap; display: block; position: relative; top: 0; left: 50%;">Firstname</span></th> <th>Lastname</th> <th>Email</th> </tr> </thead> <tbody> <tr> <td>John</td> <td>Doe</td> <td>john@example.com</td> </tr> <tr> <td>Mary</td> <td>Moe</td> <td>Mary@example.com</td> </tr> <tr> <td>July</td> <td>Dooley</td> <td>july@example.com</td> </tr> <tr> <td>Mary</td> <td>Moe</td> <td>Mary@example.com</td> </tr> <tr> <td>July</td> <td>Dooley</td> <td>july@example.com</td> </tr> <tr> <td>John</td> <td>Doe</td> <td>john@example.com</td> </tr> <tr> <td>Mary</td> <td>Moe</td> <td>Mary@example.com</td> </tr> <tr> <td>July</td> <td>Dooley</td> <td>july@example.com</td> </tr> </tbody> </table>
第一和第二个打印页面的屏幕截图:
第一页打印:
第二个打印页面:
注意:当我从中移除旋转跨度时,此功能正常
缺什么?
以上是大佬教程为你收集整理的javascript – 为什么在我尝试打印网页时,每个打印页面中的内容都不重复?全部内容,希望文章能够帮你解决javascript – 为什么在我尝试打印网页时,每个打印页面中的内容都不重复?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。