jquery simplemodal:将#simplemodal-container移动到0,0进行打印?
我们的 simplemodal 警报 div 需要可打印。在大多数情况下,内容本身应该很好地适合页面,但我无法覆盖打印 CSS 中的定位以使其与顶部/左侧齐平以便打印,以避免右侧被切断。
似乎我可以在打印 CSS 中更改 #simplemodal-container 来更改除定位之外的所有内容。我尝试将其绝对定位并关闭所有填充和边距,但没有任何效果:它仍然像在屏幕版本上一样出现在中心。
有谁知道如何覆盖 media="print" 的方法?
Our simplemodal alert div needs to be printable. The content itself should fit on the page fine in most cases, but I can't override the positioning in my print css to get it flush top/left for printing to avoid having the right side cut off.
It seems like I can change #simplemodal-container in my print css for everything but positioning. I've tried to position it absolutely and turn off all padding and margins but nothing works: it still appears in the center as it does on the screen version.
Does anyone know a way to override this for media="print"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设覆盖不起作用,因为 #simplemodal-container 应用了内联样式。您可以尝试以下解决方案(不幸的是,该解决方案不适用于 IE <= 6):
I'm assuming the overrides weren't working because #simplemodal-container has inline styles applied. You could try the following solution (which unfortunately won't work on IE <= 6):