美文网首页
Box-shadow应用

Box-shadow应用

作者: LC_Ansel | 来源:发表于2019-01-08 12:22 被阅读0次

Box-shadow:inset是内阴影(写前写后都可以)
outset是外阴影
第一个值是水平偏移量
第二个值是垂直偏移量
第三个值是基于两边边框同时模糊
第四个值基于边框同时放大xxxpx
第五个值时阴影颜色

<div></div>
*{
    margin: 0px;
    padding: 0px;
}
 body{
    background-color:#000;
}
div{
    position: absolute;
    width: 200px;
    height: 200px;
    /* border: 1px solid #ccc; */
    top: calc(50% - 100px);
    left: calc(50% - 100px);
    border-radius:50%;

    box-shadow:inset 0px 0px 50px #fff,
               inset 10px 0px 80px #f0f,
               inset -10px 0px 80px #0ff,
               inset 10px 0px 180px #f0f,
               inset -10px 0px 180px #0ff,
               0px 0px 50px #fff,
               10px 0px 50px #0ff,
               -10px 0px 50px #f0f;
} 
image.png

相关文章

网友评论

      本文标题:Box-shadow应用

      本文链接:https://www.haomeiwen.com/subject/crgsrqtx.html