css - Safari:混合混合模式亮度无法正常工作
问题描述
我有一张mix-blend-mode
在 Firefox 和 chrome 上完美运行的图像,但不适用于 safari。叠加层位于我拥有的 CSS 滑块上,但我发现它transform
弄乱了mix-blend-mode
属性。如何避免转换干扰 css 样式。
我正在使用Swiper Slider
下面我放置了我的代码以及它的外观。最终结果应如下所示:
section {
position: relative;
will-change: opacity;
}
section::after {
background-color: #3b5873;
border: 33.325px solid #c4ae7e;
content: '';
display: block;
height: calc(100% - 66.65px);
position: absolute;
top: 0;
width: calc(100% - 66.65px);
}
.container {
background-color: #fff;
height: 100%;
width: 100%;
position: relative;
mix-blend-mode: luminosity;
z-index: 9;
}
.image-bg {
background-size: cover;
padding-top: 59.08%;
}
<section>
<div class="container">
<div class="image-bg" style="background-image:url('http://dev-thepaxton.pantheonsite.io/wp-content/themes/paxton-theme/dist/images/home/gallery_0.jpg')"></div>
</div>
</section>
解决方案
不幸的是,mix-blend-mode
Safari/WebKit SVG 元素不支持:
https://caniuse.com/#feat=mdn-css_properties_mix-blend-mode_svg
推荐阅读
- sql - Case 语句给出错误无法将 'ABC' 转换为 float8
- postgresql - 如何使用 postgres 按地区选择车辆数量
- react-native - React Native:有条件地渲染组件
- jenkins - 参数化远程触发器未触发远程詹金斯作业
- javascript - 快速服务器并发
- sql-server - 视图中的系统版本化(临时)表
- python-3.6 - 在 Python 3.6 中使用 asyncio 执行终端命令时出错
- error-handling - Angular 6,在激活的路线中捕获“错误/无效参数”
- hive - Impala [目录] 和 Hive [Metastore/Sentry] 不同步
- python - “Mini Keras”有没有办法在没有整个 keras 包的情况下从训练有素的 keras 模型中获得预测?