我希望我的 HTML 背景不透明度为 .9
,但由于某些原因它不起作用。为什么会这样我真的不明白...
CSS
html{
background: url(http://img.pixland.uz/u841f174959.jpg
) no-repeat center center fixed;
background-size: cover;
opacity: 1; <!-- if i decrease opacity 1 to 0.9 it will become very small -->
}
最佳答案
CSS
html,body{
background: url(http://img.pixland.uz/u841f174959.jpg) no-repeat center center fixed;
background-size: cover;
opacity: 0.5;
height: 100%;
}
关于css - opacity 属性有一些问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23880571/