图片叠加

<template>
  <div id="bg_img">
    <img
      src="/static/img/pexels-pixabay-209831.jpg"
      alt="叠加图片"
      height="100%"
      width="100%"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {},
  mounted() {}
};
</script>

<style scoped>
#bg_img {
  width: 100%;
  height: 100vh;
  background: url("../../static/img/pexels-mabel-amber-125457.jpg") no-repeat;
  background-size: 100% 100%;
}

#bg_img img {
  object-fit: cover;
  opacity: 0.4;
}
</style>

 

posted @ 2021-06-04 09:24  yw3692582  阅读(46)  评论(0编辑  收藏  举报