Commit b5a09725 by 李嘉林

背景优化

parent 9073a2e8
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
'background-position': pageSettingData.backgroundFit == 'equiratioFill' ? 'center' : '', 'background-position': pageSettingData.backgroundFit == 'equiratioFill' ? 'center' : '',
'background-attachment': pageSettingData.backgroundImageLock ? 'fixed' : 'local', 'background-attachment': pageSettingData.backgroundImageLock ? 'fixed' : 'local',
}"> }">
<div class="gradient" v-if="pageSettingData.bgFullScreen"></div> <div class="gradient" v-if="pageSettingData.bgFullScreen"></div>
</div> </div>
</template> </template>
...@@ -60,7 +60,6 @@ export default { ...@@ -60,7 +60,6 @@ export default {
}, },
methods: { methods: {
setHomeBgImg({ backgroundImage, imgRgb }) { setHomeBgImg({ backgroundImage, imgRgb }) {
console.log('imgRgb->', imgRgb)
// this.bacImage = backgroundImage; // this.bacImage = backgroundImage;
if (this.pageCode != 1) return; if (this.pageCode != 1) return;
this.bacImage = ""; this.bacImage = "";
...@@ -78,14 +77,16 @@ export default { ...@@ -78,14 +77,16 @@ export default {
position: absolute; position: absolute;
top: 0; top: 0;
z-index: -1; z-index: -1;
.gradient{
.gradient {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: linear-gradient(rgba(0, 0, 0, 0) 10%, rgb(255, 255, 255) 40%); background: linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, 1) 80%);
} }
transition: background-color .5s; transition: background-color .5s;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment