I have set the fixed position, you can set it to whatever you want. .bg-image { width: 100%; height: 100%; position: fixed; right: 0; left: 0; top: 0; bottom: 0; }