css - 修复警告 "Also define the standard property ' box-shadow' 以实现兼容性”

标签 css visual-studio-code bootstrap-4

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

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

我该如何修复它或至少忽略 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)

.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;
}

关于css - 修复警告 "Also define the standard property ' box-shadow' 以实现兼容性”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55586658/

相关文章:

javascript - 当我切换另一个元素时,如何使跨度正确对齐?

c# - 在 vscode 中使用 Angular 4 调试 Asp.Net Core 应用程序

flutter - Flutter:调试构建成功,但发布产生错误

python-3.x - 用 MinGW 或其他 C++ 编译器模仿 Visual C++(对于基于 Visual C++ 的 Python 包)?

html - 无论页面高度如何,都让div停留在一个地方

html - 关键帧图像幻灯片有效但不适用于 WordPress

css - 如何制作固定大小的div而不考虑内容

html - 在 Bootstrap 中使用单选按钮更改标签字体大小时出现对齐问题

javascript - 如何在 Gatsby 网站中添加 bootstrap js

jquery - fadeIn() 先显示后淡出