Sunday 15 September 2013

css - Generate a saturation/brightness mask using gradients -


I would like to know whether it is possible to generate a mask of saturation + for example, such as the brightness used in color glands But in CSS 3 only using linear-gradient? I tried different things like:

  Background: Linear-gradient (right, HSLA (0, 100%, 0,0) 0%, HSLA (0,0%, 0% .5) 100%), / * saturation mask * / linear-gradient (top, HSLA (0,0%, 0%, 5) 0%, HSLA (0,0%, 100%, 5) 100% ), / * Illumination mask * /   

But I can not do anything like a picture, the exact combination can not be found, and because I do not fully understand, t know that it's possible.

Thank you

Perhaps the way you write it.

  1. For the image, there will be 1 gradient + a background color.
  2. You do not close your rules correctly, a value is still expected 100 , / * Li :)
  3. This can be:
      ele {background: linear-gradient (0deg, hsla (0,0) Any repeating, white linear-gradient (180 degrees, HSLA (0,0%, 0%, 5), 0%, 0%, 5% 0%, HSLA (0,0%, 100%, 5) ) 0%, HSLA (0,0%, 100%, 5) 100%) No-repetitive authority; Background-shaped: 95% 100%, 5% 100%; }   

    (The shield covers the body)

No comments:

Post a Comment