html - 降低叠加图像的不透明度
问题描述
我一直在为网页使用“大图片”模板。overlay.png 确实使我的背景更亮,因为它是覆盖 intro.jpg 的部分透明的蓝色图形。我尝试更改 css.main 文件中的不透明度和渐变/RGBA,以便我的介绍图像不会变暗。尝试没有成功。有什么想法吗?
我的 css.main 脚本:
/* Intro */
#intro {
background: url("images/overlay.png"), url("../../images/intro.jpg");
background-size: 256px 256px, cover;
background-attachment: fixed, fixed;
background-position: top left, bottom center;
background-repeat: repeat, no-repeat;
}
/* One */
#one {
background: url("images/overlay.png"), url("../../images/one.jpg");
background-size: 256px 256px, cover;
background-attachment: fixed, fixed;
background-position: top left, center center;
}
/* Two */
#two {
background: url("images/overlay.png"), url("../../images/two.jpg");
background-size: 256px 256px, cover;
background-attachment: fixed, fixed;
background-position: top left, center center;
}
请找到叠加图像。提前致谢!
解决方案
你为什么不删除整个覆盖图像和设置并像这样管理它:
#intro{
background: url(../../images/intro.jpg);
background-size: cover;
background-attachment: fixed, fixed;
background-position: top left, bottom center;
background-repeat: no-repeat;
opacity: 0.8;
}
所以你只是直接在设置中管理它opacity
?
推荐阅读
- php - 有没有办法使用自定义路由键在 laravel 中加载雄辩的关系
- maven - 模拟在本地工作,但不适用于 maven
- machine-learning - 如何保存训练有素的强化学习代理以避免每次都对其进行训练?
- http - 是否可以通过 CoAP 传输文件?
- javascript - 如何为每个类分配不同的 css 翻译值?
- docusignapi - IE11 的 DocuSign 嵌入式签名 URL 长度限制?
- android - 如何同时调用多个视图?
- python - 如何根据分隔符将一个csv单元格拆分为数据框列
- javascript - 为什么我收到错误:TypeError:无法读取未定义的属性“地图”?
- machine-learning - Keras、顺序和时间序列:我们应该扁平化还是不扁平化?