我想根据时间改变div上的背景不透明度。 我将使用css的rgba。例如,12 is是最亮的(rgba(0, 0, 0, 0)),12am是最暗的(rgba(0, 0, 0, 1)) 我找到了这个脚本并试着修改。但它会改变颜色,而且没有不透明选项。 如何更改此代码? 我真的需要你的帮助。谢谢。 Here is the script function time() {
var today = new Date();
var h = today.getHours()
if (h > 12) {
h = h - "12"
};
var m =
有人能想到为什么我的css不在这个背景图像上添加一个透明的颜色(不透明)覆盖:
.header-image {
display: block;
width: 100%;
text-align: center;
/* image must be 1900 x 500 */
background: url('back.1.jpg') no-repeat center center scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
b