硬线/盒暴露在极端的盒子阴影效果背后?

时间:2016-01-24 22:06:29

标签: html css css3 box-shadow

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

enter image description here

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

代码:

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

1 个答案:

答案 0 :(得分: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);
}