html - 在类中使用的某些背景颜色(如 #4f8a2ad4 或 #8a2a5fd4)在 div 和 img 元素中使用时具有不同的阴影
问题描述
问:为什么颜色有不同的阴影/不透明度,我该如何解决?
<!DOCTYPE.html>
<head>
<meta charset="utf-8">
<style type="text/css">
.maroon {
background-color: #4f8a2ad4;
}
</style>
</head>
<body>
<div class="maroon">
<img class="maroon" height="200" src="http://www.pngmart.com/files/7/CDN-PNG-Transparent-Image.png" alt="Any image with transparent
background">
</div>
</body>
解决方案
推荐阅读
- robotics - 通过 Isaac 使用 Realsense 435i 的 NVIDIA Jetson Nano - 找不到相机
- python - Cmake 无法将“-fPIE”标志添加到 makefile
- python - 循环中定义的python lambda函数,最终指向相同的操作
- python - 为什么无论我使用什么 dtype 都会隐式地舍入一个数字?
- php - 无法解析来自 Soap 服务的 Curl 响应(发布请愿书)
- python - BeautifullSoup 返回整个 DIV,但没有值
- android - 在真正的 android 设备上找不到 res/color/filename.xml 资源文件
- linux - 是否存在用于 stdin/stdout 的 Linux 应用程序,如果在读/写时出现问题,则通过环形缓冲区将最后一个数据输出到转储文件
- javascript - 在 ngFor 中使用 Angular 9 Slice Pipe
- angular - mat-list 显示多个项目