search

Home  >  Q&A  >  body text

css - 如何理解box-shadow中的inset?

在box-shadow属性中可以设置外阴影,内阴影。外阴影比较好理解。如何理解内阴影呢?
比如,

#Example_L {
-moz-box-shadow: inset 0 0 5px 5px #888;
-webkit-box-shadow: inset 0 0 5px 5px#888;
box-shadow: inset 0 0 5px 5px #888;
}

想象不出该有的样子。。。
我对外阴影的理解是光从元素上方照过来产生的投影。几个数值是对产生的投影的修饰。但是内阴影是如何产生的呢?

大家讲道理大家讲道理2778 days ago834

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 11:17:40

    Inset projects shadows from the side of the element, but only renders the inside of the box and discards the external shadows.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 11:17:40

    box-shadow is a very good function. The original design goal is to realize ps blur shadow
    http://blog.csdn.net/freshlover/article/details/7610269

    reply
    0
  • Cancelreply