简体   繁体   English

当 webkit 在 Chrome 和 Safari 中显示不同时发生了什么? 当前浏览器版本的浏览器前缀是否已更改?

[英]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.

相关问题 与Safari浏览器相比,Chrome浏览器的呈现方式有所不同 - Chrome browser rendering differently when compared to safari 我们有用于文本对齐的浏览器前缀:-webkit-right;(Google和safari)文本对齐:-moz-right;(Firefox)文本对齐:-o-right;(Opera)。什么是IE? - We have browser Prefixes for text-align: -webkit-right;(Google and safari)text-align: -moz-right;(Firefox)text-align: -o-right;(Opera).What is for IE? 浏览器在刷新时呈现不同的网页(当没有任何更改时) - Browser renders webpage differently on refresh (when nothing has changed) 为什么该动画在chrome浏览器之外的所有浏览器上都能正常工作? (有前缀) - Why is this animation working on every browser but chrome ? (has prefixes) 如何在webkit浏览器中删除c伪路径,如chrome,safari,opera? - how to remove c fakepath in webkit browser like chrome, safari, opera? 在不同的浏览器(Firefox,Safari,Opera,Chrome)中呈现的百分比(%)宽度不同 - percent (%) width rendered differently in different browser (firefox, safari, opera, chrome) 为什么iOS Safari(和iOS Chrome)显示背景图像与其他浏览器不同? - Why is iOS Safari (and iOS Chrome) displaying background-image's differently to every other browser? 更改选择的自定义属性时,Webkit (Chrome/Safari) 不更新显示 - Webkit (Chrome/Safari) does not update display when custom attribute selected is changed 什么是“浏览器铬”? - what is the “browser chrome”? Safari 浏览器中的“高度:内在”是什么? - What is `height: intrinsic` in the Safari browser?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM