css - Using a photo as my website's background -


i have random picture of moose lying around wanted use ruby on rails website's background. fumble online bit , here got.

html {    background-image: url(images/moose.jpg) no-repeat center center fixed;    -webkit-background-size: cover;   -moz-background-size: cover;   -o-background-size: cover;   background-size: cover; } 

the above not work, background still white. doing wrong? picture of moose located in app/assets/images/moose.jpg

i've tried using html body { } oppose html , background oppose background-image

you can't use html, have use body. should be:

body {     background:url('images/moose.jpg') no-repeat center center fixed; } 

open chrome inspector , @ background-image styles loading.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -