Sketch to CSS - Radial Gradient Css Export Problem

1.9k views Asked by At

My English is a little bad. Sorry. There is a design prepared in the Sketch program. I couldn't spill the radial gradiant correctly into the css code. How do I get the same radial gradiant appearance?

Screenshots : https://i.stack.imgur.com/8DrNp.jpg - https://i.stack.imgur.com/ke7Il.jpg

Radial Gradiant Height : 1000px

Radial Gradiant Color : #3F46AD (Opacity 10%)

Note: The "Copy CSS Attributes (Sketch)" feature did not export correctly;

HTML :

<div class="gradient-bg-wrapper">

</div>

<div class="text-wrapper">
    test test test
</div>

CSS :

.gradient-bg-wrapper{
    height: 1000px;
    background-image: radial-gradient(50% 124%, #3F46AD 75%, #FFFFFF 100%);
    opacity: 0.1;
 }
1

There are 1 answers

0
Minal Chauhan On

Try this:

.gradient-bg-wrapper{
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(63,70,173,0.1) 0%,rgba(255,255,255,0.1) 100%);
 }
<div class="gradient-bg-wrapper">
</div>

<div class="text-wrapper">
    test test test
</div>