4 changed files with 33 additions and 7 deletions
@ -0,0 +1,28 @@ |
|||||
|
<template> |
||||
|
<div :style="getStyle()"/> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'BackgroundImage', |
||||
|
data: () => ({ |
||||
|
blur_px: 5 |
||||
|
}), |
||||
|
methods: { |
||||
|
getStyle(){ |
||||
|
return { |
||||
|
"position": "fixed", |
||||
|
"background-size": "cover", |
||||
|
"background-repeat":"no-repeat", |
||||
|
"background-position":"center center", |
||||
|
"left": 0, |
||||
|
"right": 0, |
||||
|
"z-index": -1, |
||||
|
"width":"100%", |
||||
|
"height":"100%", |
||||
|
"background-color": "rgba(0, 0, 0, .5)", |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
Loading…
Reference in new issue