Last active
July 14, 2018 10:40
-
-
Save wicky-andrian/dd39c5aa773fa4fa70b077784fa2468b to your computer and use it in GitHub Desktop.
active storage in css inline for background-image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
<style media="screen"> | |
body { background-image: url('<%= image_tag @sets.collect(&:background_website).detect(&:attached?) %>') !important; | |
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
background-size: cover; | |
-o-background-size: cover; | |
} | |
</style> | |
<div class="body"></div> | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see my issue on rails
and sample app