1

如何消除这种效果,使它只是一个干净的盒子阴影发光?

在此处输入图像描述

https://jsfiddle.net/stu9qjLp/2/

代码:

#test {
    border: 1px solid red;
    border-radius: 1px;
    width: 1px;
    height: 1px;
    box-shadow: 0 0 250px 125px red;
}
4

1 回答 1

3

也许是径向渐变?

body {
  margin: 0;
  height: 100vh;
  background: #000;
}

body::before {
  content: '';
  position: absolute;
  height: 100%;
  width: 100%;
  background-image: radial-gradient(ellipse at center top, red, black 50%, black);
}

于 2016-01-24T22:19:25.247 回答