且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CSS背景图像变暗

更新时间:2022-10-19 14:18:06

I would go for photoshop to blur the background or give it an overlay. However you can try giving it a linear gradient on your top-container class before the url call on the background-image as so:

background: linear-gradient( rgba(0,0,0,0.5), rgba(0, 0, 0, 0.5) ),url(../images/background1.jpg) no-repeat center center fixed;

just change the rgba value to what you need. Hope this helps.