【问题标题】:Invalid Box Shadow Property Value无效的框阴影属性值
【发布时间】:2022-10-14 15:37:33
【问题描述】:

我在使用 inset 属性时遇到了问题,我在检查时收到了无效属性值的错误,我的代码运行良好,但它拒绝应用于我的浏览器。enter image description here

这是我的代码

div {
  padding: 5px 10px;
  box-shadow: inset 8px 8px 8px #cbced1, inset -8px -8px -8px #fff;
  border-radius: 20px;
}
<div></div>

【问题讨论】:

    标签: css


    【解决方案1】:

    您为阴影模糊指定了一个负值,这是无效的。

    div {
      padding: 5px 10px;
      box-shadow: inset 8px 8px 8px #cbced1, inset -8px -8px 8px #fff;
      border-radius: 20px;
      width: 50px;
      height: 50px;
    }
    <div></div>

    【讨论】:

      猜你喜欢
      • 2021-07-15
      • 1970-01-01
      • 2017-11-30
      • 1970-01-01
      • 1970-01-01
      • 2017-02-27
      • 1970-01-01
      • 2018-08-29
      • 1970-01-01
      相关资源
      最近更新 更多