gradient - CSS Background-Blend-Mode over two Elements -



gradient - CSS Background-Blend-Mode over two Elements -

lets assume have div gradient applied background-property. want overlay black png (of smaller size) , set png have background-blend-mode of overlay. unfortunately have no thought on how accomplish this.

i know can have working background-blend-mode when render gradient css of div png image like:

background: url(../img/plus.png), linear-gradient(to bottom, #24cae4 0%, #1f81e3 100%); background-blend-mode: overlay;

this results in gradient beingness little actual png, not desired effect, this:

what want accomplish pure css (if possible):

here codepen illustrate i'm trying do: http://codepen.io/anon/pen/zxoxgp notice black icon. wanna overlay this.

try using mix-blend-mode instead of background-blend-mode , switch simple text plus-sign or webfont more custom figures.

example codepen of below:

class="snippet-code-css lang-css prettyprint-override">.placeholder { position: relative; width: 400px; height: 300px; background-image: -moz-linear-gradient(#ff0000, #0000ff); background-image: -webkit-linear-gradient(#ff0000, #0000ff); background-image: linear-gradient(#ff0000, #0000ff); } .center { position: absolute; top: 25%; width: 100%; font-size: 120px; } .center span { display: block; text-align: center; color: red; mix-blend-mode: screen; } class="snippet-code-html lang-html prettyprint-override"><div class="placeholder"> <div class="center"><span>+</span> </div> </div>

css gradient background-blend-mode

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -