Rails: How to set a background image in rails from css?

后端 未结 14 1401
太阳男子
太阳男子 2020-12-08 06:01

I am using rails 3.2 and i have to set a background for one of the page and i have tried many ways and nothing went right, so looking for some good help. I have tried

14条回答
  •  失恋的感觉
    2020-12-08 07:01

    if you have your image into app/assets/images and its name is 'zi-fullscreen-bg.png', for example then you can use

    .hero-unit.fullscreen-image-bg {
      background-image: url('zi-fullscreen-bg.png');
    }
    

    at least it worked for me!

提交回复
热议问题