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

后端 未结 14 1417
太阳男子
太阳男子 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条回答
  •  Happy的楠姐
    2020-12-08 06:36

    I struggled with this for an entire day. Finally I got it working in both development and production by coding the css in the view that holds the background image:

    
                
    
    

    Then on the sheet itself I created a div with id=tile like this:

    ...added more stuff

    Ruby 2.3.7 Rails 5.2.0

提交回复
热议问题