【发布时间】:2020-04-13 05:51:05
【问题描述】:
这个网站有一个问题:除了 safari 之外,所有浏览器都可以。如您所见,在 safari 中,法拉利附近有 2 行不同的红色,这是因为 safari 没有读取我用来保持汽车图像相同红色的 1x1px 背景图像(我m 使用图像,因为汽车已包含颜色配置文件,因此颜色代码不同。
http://www.aformulaonehistory.com
有人知道为什么吗?
结构是这样的
<div class="background_color">
<div id="car_in_background">
</div>
</div>
使用这样的 CSS:
.background_color {
background: url('http://www.mydomain.com/img/image.jpg') repeat;
}
#car_in_background {
background: url('http://www.mydomain.com/img/car.jpg') no-repeat center center;
background-size:contain;
height:101%;
overflow:hidden;
position:relative;
}
谢谢!
编辑:我认为 safari 会读取背景图像,但不会读取颜色配置文件。这很奇怪,因为图像包含了 ICC 配置文件(在 ffox 和 chrome 中正确显示)。
【问题讨论】:
标签: css image background safari