0

In my code (transparent text)mix-blend-mode doesn't work.why?

28th Dec 2018, 9:41 AM
NISHA QURESHI
NISHA QURESHI - avatar
18 odpowiedzi
28th Dec 2018, 2:10 PM
Calviղ
Calviղ - avatar
+ 4
Wow! 👏👏, 👏👏👏👏
28th Dec 2018, 2:12 PM
Gordon
Gordon - avatar
+ 3
NISHA QURESHI Can you see the mix-blend-mode effect in this code? https://code.sololearn.com/WB80fnrrKMNC/?ref=app
28th Dec 2018, 12:02 PM
Gordon
Gordon - avatar
+ 3
You need a parent div instead of body https://code.sololearn.com/WiPb30p7919J/?ref=app
28th Dec 2018, 12:08 PM
Gordon
Gordon - avatar
+ 3
Parent QUOTE FROM MDN: The mix-blend-mode CSS property sets how an element's content should blend with the content of the element's parent and the element's background. UNQUOTE
28th Dec 2018, 12:17 PM
Gordon
Gordon - avatar
+ 3
It can be p or something else except body, just for containing your h2
28th Dec 2018, 12:20 PM
Gordon
Gordon - avatar
+ 3
I'm not familiar with mix-blend-mode. But it seems that the background layer need to have a underneath white layer in order to blend with the text. Try to put html { background-color: white; } Edit: I found the solution from stackflow Add this css html { background: white; display: flex; height: 100%; } https://stackoverflow.com/questions/43503755/did-chrome-safari-recently-change-the-way-mix-blend-mode-is-handled
28th Dec 2018, 1:03 PM
Calviղ
Calviղ - avatar
28th Dec 2018, 1:21 PM
Gordon
Gordon - avatar
+ 3
html{ Background-color:white; display: flex; min-height: 100%; } https://code.sololearn.com/WUdbOx55JJyG/?ref=app
28th Dec 2018, 2:06 PM
Calviղ
Calviղ - avatar
+ 2
Learner Her code is this : https://code.sololearn.com/WcvRZ2j78c7t/?ref=app NISHA QURESHI Demo of mix-blend-mode : https://code.sololearn.com/WB80fnrrKMNC/?ref=app If you cannot see mix-blend-mode also in this demo, it's Compatibility https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode Are you running the code in computer or in mobile app? What version of browser are you using?
28th Dec 2018, 9:56 AM
Gordon
Gordon - avatar
+ 2
But just in case I am wrong, I better invite a knowledgeable sololearners to explain this. Can you help us, Calviղ ?
28th Dec 2018, 12:25 PM
Gordon
Gordon - avatar
+ 2
Is there any way to remove the white surrounding?
28th Dec 2018, 2:08 PM
Gordon
Gordon - avatar
+ 1
No,This is not my answer.I just want to know that why my code doesn't support mix-blend-mode property
28th Dec 2018, 12:01 PM
NISHA QURESHI
NISHA QURESHI - avatar
+ 1
Yes
28th Dec 2018, 12:03 PM
NISHA QURESHI
NISHA QURESHI - avatar
+ 1
Why div is added Is it not possible without div element?
28th Dec 2018, 12:12 PM
NISHA QURESHI
NISHA QURESHI - avatar