Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div id="hero" v-bind:style="{ backgroundImage: 'url(' + img + ')' }" class="bg-img">
- </div>
- </template>
- <script>
- import image from '@/assets/images/hands.jpeg'
- import $ from 'jquery'
- export default {
- data(){
- return{
- img:image
- }
- }
- }
- </script>
- <style scoped>
- #hero{
- width: 100%;
- height: 500px;
- }
- .bg-img {
- background-position: center center;
- background-repeat: no-repeat;
- background-attachment: fixed;
- background-size: cover;
- background-color: #999;
- }
- </style>
Add Comment
Please, Sign In to add comment