自学内容网 自学内容网

【CSS】渐变光晕

在这里插入图片描述

dom元素

<div id="box" class="glow"></div>

css样式

#box
{    
    height: 300px;
    width: 300px;
    background-image: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 127, color-stop(0%, #CE1A1A), color-stop(100%, #ffffff));
    background-image: -webkit-radial-gradient(center center, farthest-corner, #CE1A1A 0%, #ffffff 100%);
    background-image: -moz-radial-gradient(center center, farthest-corner, #CE1A1A 0%, #ffffff 100%);
    background-image: -ms-radial-gradient(center center, farthest-corner, #CE1A1A 0%, #ffffff 100%);
    background-image: -o-radial-gradient(center center, farthest-corner, #CE1A1A 0%, #ffffff 100%);
    background-image: radial-gradient(farthest-corner at center center, #CE1A1A 0%, #ffffff 100%);
}

原文地址:https://blog.csdn.net/qq_44632227/article/details/145134655

免责声明:本站文章内容转载自网络资源,如侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!