mix-blend-mode

Mix-blend-mode working when applied to one element but not another

♀尐吖头ヾ 提交于 2021-02-11 08:44:22
问题 I am using mix-blend-mode on css-generated content to create a multiplied background effect. When I apply this generated element to an outer wrapper it has the intended effect: .standard-cover { background: blue; color: #fff; position: absolute; top: 0; left: 0; width: 100%; min-height: 100%; display: flex; } .standard-cover:after { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 20; content: ""; background: blue; mix-blend-mode: multiply; } .image-wrap { line-height:

How to fix Safari mix-blend-mode: color-dodge bug?

余生长醉 提交于 2021-01-29 13:50:59
问题 I want to achieve some text that sits on top of an image and using mix-blend-mode: color-dodge to make the text looks better. Here is the example: https://codepen.io/pizza0502/pen/KepWGM It works perfectly in Chrome and Firefox, but in Safari, the text that is not on top of the image will become white...any solution on this? 回答1: Wrap your items in a container, isolate the container, and don't absolutely position your h1 . div { isolation: isolate; } h1 { font-size: 10rem; color: #fb4b6b; mix

Safari 14 - CSS rendering issues related to background gradients, background-attachment, mix-blend-mode

时光毁灭记忆、已成空白 提交于 2021-01-29 05:50:42
问题 My question is how to fix rendering issues in Safari 14 related to a combination of multiple background gradients ( linear and radial ), background-attachment ( local and scroll ) and ``mix-blend-mode`. Please see example: https://codepen.io/astro87/pen/LYRQNbd?editors=1100 Correct rendering in Google Chrome Background gradient visible on the right edge: Scroll a bit to the right and see background gradient is visible on the left and right edge: Scroll completely to the right edge and see

Safari 14 - CSS rendering issues related to background gradients, background-attachment, mix-blend-mode

北城以北 提交于 2021-01-29 05:48:01
问题 My question is how to fix rendering issues in Safari 14 related to a combination of multiple background gradients ( linear and radial ), background-attachment ( local and scroll ) and ``mix-blend-mode`. Please see example: https://codepen.io/astro87/pen/LYRQNbd?editors=1100 Correct rendering in Google Chrome Background gradient visible on the right edge: Scroll a bit to the right and see background gradient is visible on the left and right edge: Scroll completely to the right edge and see

Using mix-blend-mode on nested components with a different z-index

ε祈祈猫儿з 提交于 2021-01-28 11:58:34
问题 I have a setup that uses nested, absolute-positioned divs, and I need mix-blend-mode to blend the elements of a div with all of elements that have a lower z-index than that div. The catch is that each div must have its own independent z-index (this cannot be changed for accessibility reasons). This is easier to explain with an example: #layer-1 { width: 700px; height: 700px; position: absolute; background-color: maroon; z-index: 1; } #layer-2 { position: absolute; height: 100px; width: 200px;