[英]What has happened when webkit shows differently in Chrome and Safari? Have browser prefixes changed for current browser versions?
Have any of the old prefixes been deprecated in the newer versions of the following browsers?以下浏览器的较新版本中是否已弃用任何旧前缀?
Chrome: -webkit- Internet Explorer: -ms- Safari: -webkit- Firefox: -moz- Chrome:-webkit- Internet Explorer:-ms- Safari:-webkit- Firefox:-moz-
We are attempting to remove PDF's but still want to provide an option for users to print a styled web page print document.我们正在尝试删除 PDF,但仍希望为用户提供打印样式 web 页面打印文档的选项。 I have been creating a print stylesheet for a stylized double sided sell sheet, and I have noticed that Safari and webkit do not treat @media print margins the same.我一直在为风格化的双面销售表创建打印样式表,我注意到 Safari 和 webkit 不会将@media 打印边距视为相同。 Should they because they are both webkit?他们应该因为他们都是webkit吗?
The CSS I'm using works in all the browsers but Safari.我使用的 CSS 适用于所有浏览器,但 Safari 除外。
@page {
/* size: A4 portrait; */
margin:0;
}
@page :header { content: none ;}
@page :footer { content: none ;}
@media print {
* {
-webkit-print-color-adjust: exact !important; /* Chrome, Safari */
color-adjust: exact !important; /*Firefox*/
}
body {
background-color:#FFFFFF;
border: solid px #000;
margin: 2cm .508cm .508cm; /*.508cm;*/
}
I suspect it's the way I have set up the margins, but I have it working well in Chrome, Explorer, and Firefox.我怀疑这是我设置边距的方式,但我让它在 Chrome、Explorer 和 Firefox 中运行良好。
Safari errors: 1. header and footer page print information text shows in margin. Safari 错误: 1. header 和页脚打印信息文本显示在页边距。 2. It prints 4 pages and it looks like the page size (letter portrait) is pushing past the page break. 2. 它打印了 4 页,看起来页面大小(字母纵向)超过了分页符。
What I did was adjust the size to reduce the runoff.我所做的是调整大小以减少径流。
@page page-one page-two{
/*margin: 0cm;*/
width: 21.59cm; /* 8.5in */
height: 25.94cm; /* = margin-top - 27.94cm; /* 11in */
margin: 0cm;
/* margin: 30mm 45mm 30mm 45mm;*/
}
.page-one {
page-break-after: always;
}
I feel I have made an error.我觉得我犯了一个错误。 Is there a logical way to set up a styled CSS page so it prints the same on all browsers?是否有一种合乎逻辑的方法来设置样式化的 CSS 页面,以便在所有浏览器上打印相同?
AFAIK Chrome doesn't need -webkit-
for certain features of CSS from a certain date.从某个日期起,AFAIK Chrome 不需要-webkit-
来获取 CSS 的某些功能。 I don't know if this is one of these, but it would make sense if the issue was with the -webkit-
line as only Safari still needs those tags.我不知道这是否是其中之一,但如果问题出在-webkit-
行上会很有意义,因为只有 Safari 仍然需要这些标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.