CSS - 创建多个盒子阴影

3
我有这样的代码
body {
  /*some styling for make div on center*/
}
div {
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius:50%;
    box-shadow: 0 0 5px 7px rgba(230, 230, 230, 0.4);
}

http://jsfiddle.net/zu9rd1jq/68/

我想在一个box-shadow之后再加上多个box-shadow,就像在photoshop中一样。但是使用CSS该怎么做呢?有什么想法吗?


1
你可以在 box-shadow 中使用 , 来叠加更多的阴影,可以参考这个链接:https://codepen.io/sdthornton/pen/wBZdXq - sTx
@sTx 谢谢你的信息 :) - Bariq Dharmawan
1个回答

8

I Hope you are looking for this

div {
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius:50%;
    box-shadow: 0 5px 0 rgba(255, 0, 0, 1), 0 10px 0 rgba(0, 255, 0, 1);
}

是的,当然。我喜欢它!谢谢 :) - Bariq Dharmawan

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接