cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <svg viewBox="0 0 200 200">
    <defs>
        <!-- Разноцветный градиент -->
        <linearGradient id="gradient--colors"
            x1="0" y1="100%"
            x2="100%" y2="0">
            <stop offset="0%"
                stop-color="dodgerblue"/>
            <stop offset="50%"
                stop-color="fuchsia"/>
            <stop offset="100%"
                stop-color="yellow"/>
        </linearGradient>

        <!-- Градиент прозрачности разноцветного слоя -->
        <radialGradient id="gradient--colors-transparency"
            fx="25%" fy="25%">
            <stop offset="0%"
                  stop-color="black"/>
            <stop offset="30%"
                  stop-color="black"
                  stop-opacity=".2"/>
            <stop offset="97%"
                  stop-color="white"
                  stop-opacity=".4"/>
            <stop offset="100%"
                  stop-color="black"/>
        </radialGradient>

        <!-- Маска прозрачности разноцветного слоя -->
        <mask id="mask--colors-transparency">
            <rect fill="url(#gradient--colors-transparency)"
              width="100%" height="100%"></rect>
        </mask>

        <!-- Градиент для прозрачности -->
        <radialGradient id="gradient--bw-light" fy="10%">
            <stop offset="60%"
                  stop-color="black"
                  stop-opacity="0"/>
            <stop offset="90%"
                  stop-color="white"
                  stop-opacity=".25"/>
            <stop offset="100%"
                  stop-color="black"/>
        </radialGradient>

        <!-- Маска для нижнего отражения -->
        <mask id="mask--light-bottom">
            <rect fill="url(#gradient--bw-light)"
                width="100%" height="100%"></rect>
        </mask>

        <!-- Маска для верхнего отражения -->
        <mask id="mask--light-top">
            <rect fill="url(#gradient--bw-light)"
                width="100%" height="100%"
                transform="rotate(180, 100, 100)"></rect>
        </mask>

                <!-- Градиент блика -->
        <radialGradient id="gradient--spot" fy="20%">
            <stop offset="10%"
                  stop-color="white"
                  stop-opacity=".7"/>
            <stop offset="70%"
                  stop-color="white"
                  stop-opacity="0"/>
        </radialGradient>
    </defs>        

    <!-- Нижний блик -->
    <ellipse rx="40" ry="20" cx="150" cy="150"
       fill="url(#gradient--spot)"
       transform="rotate(-225, 150, 150)">
    </ellipse>    

    <!-- Нижнее отражение -->
    <circle r="50%" cx="50%" cy="50%"
        fill="aqua"
        mask="url(#mask--light-bottom)">
    </circle>

    <!-- Верхнее отражение -->
    <circle r="50%" cx="50%" cy="50%"
        fill="yellow"
        mask="url(#mask--light-top)">
    </circle>


    <!-- Верхний блик -->
    <ellipse rx="55" ry="25" cx="55" cy="55"
       fill="url(#gradient--spot)"
       transform="rotate(-45, 55, 55)">
    </ellipse>

    <!-- Фигура с маской и разноцветным градиентом -->
    <circle r="50%" cx="50%" cy="50%"
        fill="url(#gradient--colors)"
        mask="url(#mask--colors-transparency)">
    </circle>

</svg>


            
          
!
            
              BODY {
    background-color: #222;
    background-image: linear-gradient( to right,
        rgba(0,0,0,.2) 50%,
        rgba(0,0,0,0)  50%
    );
    background-size: 2em 2em;
    background-position: center center;
}

svg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    padding: 2rem;
}
            
          
!
999px
Loading ..................

Console