修复警告“还定义了标准属性'box-shadow'以实现兼容性" [英] Fix Warning "Also define the standard property 'box-shadow' for compatibility"

查看:3726
本文介绍了修复警告“还定义了标准属性'box-shadow'以实现兼容性"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MDB滚动库,VSCode显示以下警告:

I use the MDB scroll library, and VSCode shows the following warning:

还定义了标准属性"box-shadow"以实现兼容性

Also define the standard property 'box-shadow' for compatibility

如何解决它或至少忽略VSCode上的警告?

How can I fix it or at least ignore the warning on VSCode?

.scrollbar-black::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
    background-color: #000;
}

推荐答案

我的意思是,除了供应商前缀版本(-webkit-box-shadow)之外,您还应该添加标准样式规则(box-shadow)

I means you should add the standard style rule (box-shadow) in addition to the vendor prefixed version (-webkit-box-shadow)

.scrollbar-black::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
            box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); // <- Add this to fix.    
    background-color: #000;
}

这篇关于修复警告“还定义了标准属性'box-shadow'以实现兼容性"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆