css - Multiple gradients and radial gradient with center outside of the element -


is possible similar result css gradients? can use 2 gradients on 1 div , can radial 1 have center outside div?

desired result

it possible add more 1 gradient element (even combination of linear , radial gradients) providing them in comma separated format in below snippet. gradient specified first (from right side) forms bottom layer while specified last comes on top. key thing note gradient (on top) must have colors alpha less 1 able show colors in lower layers.

coming second part of question, radial gradients can created such center point outside div. can done specifying negative values position.

the gradient in below snippet not tally 100% image provided in question can idea.

div{    height: 200px;    width: 150px;    border: 1px solid;    border-radius: 12px;    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7)), radial-gradient(ellipse @ -40% -50%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 50%);    background-size: 180% 200%;  }
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>  <div class='gradient'></div>


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -