html - CSS: background image with gradient "overlay" -
first, wanna accomplish:
- i want background: http://codepen.io/anon/pen/mjwyye
- with similar gradient 1 on image:
now, problems tackle:
- i'd gradient's center 100% transparent. i'll have text , other things @ center of page, in other words want no gradient color "blocking" center of page.
- i'd gradient "overlay" cover whole page, instead of each repeat of image
i tried many different ways place gradient on background image, worked without results wanted. 1 worked places gradient on image, per every {image} repeat.
this last try won't work. not mention, failing replicate gradient on sample image provided:
body { background: url('http://www.juvera.me/_img/vista.png') center center repeat, radial-gradient(ellipse @ center, rgba(181,189,200,1) 0%,rgba(130,140,149,1) 50%,rgba(40,52,59,1) 100%); /* w3c */ opacity: .8; }
it better set different properties 1 one, it's easier check doing.
and order opposite, elelemnt want overlay must first background-image
the first background-size 1 of gradient, , second 1 (30 px) size of repeating pattern. can adjust whatever want.
body { height: 100%; background-image: radial-gradient(ellipse @ center, rgba(181,189,200,0) 0%,rgba(130,140,149,0) 50%,rgba(40,52,59,1) 100%), url('http://www.juvera.me/_img/vista.png'); background-repeat: no-repeat, repeat; background-size: 100% 100%, 30px 30px; } html { height: 100%; }
Comments
Post a Comment