用css滤镜做颜色不同的数据卡片(背景图对于css滤镜的使用)

20 篇文章 1 订阅
18 篇文章 0 订阅
<template>
<div class="xx_modal_maincon">
        <div class="xx_model_bt">履约起始日至计算日配额及履约情况</div>
        <el-row>
          <el-col :span="6">
            <div class="xx_modal_mod">
              <div class="mod_top_box img_blue">
                <div class="mod_img_box"></div>
                <div class="mod_right_box">
                  <span>{{ reportobj.tpess }}</span>
                  <a>碳配额试算(tCO₂)</a>
                </div>
              </div>
              <div class="mod_bottom_box img_blue"></div>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="xx_modal_mod">
              <div class="mod_top_box img_pur">
                <div class="mod_img_box"></div>
                <div class="mod_right_box">
                  <span>{{ reportobj.tpfl }}</span>
                  <a>碳排放量(吨)</a>
                </div>
              </div>
              <div class="mod_bottom_box img_pur"></div>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="xx_modal_mod">
              <div class="mod_top_box img_yellow">
                <div class="mod_img_box"></div>
                <div class="mod_right_box">
                  <span>{{ reportobj.tpeyy }}</span>
                  <a>{{tpeyytitle}}</a>
                </div>
              </div>
              <div class="mod_bottom_box img_yellow"></div>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="xx_modal_mod">
              <div class="mod_top_box img_green">
                <div class="mod_img_box"></div>
                <div class="mod_right_box">
                  <span>{{ reportobj.yjndtscyl }}</span>
                  <a>预计年度碳市场盈利(万元)</a>
                </div>
              </div>
              <div class="mod_bottom_box img_green"></div>
            </div>
          </el-col>
        </el-row>
      </div>
</template>

<style>
.xx_modal_box{
  width: 100%;
  height: 100%;
  .xx_modal_tit{
    width: 100%;
    height: 2rem;
    text-align: center;
    padding: 10px 0;
    line-height: 2rem;
  }
  h4{
    color: #0f538d;
    font-size: 1.5rem;
    letter-spacing: .3rem;
  }
  .xx_modal_maincon{
    width: 90%;
    height: auto;
    margin: 10px 5%;
    padding: 10px;
    background-color: #f1f9f9;
    border-radius: 10px;
    .xx_model_bt{
      color: #0f538d;
      font-size: 1.3rem;
      letter-spacing: .3rem;
      height: 40px;
      line-height: 40px;
      padding-left: 30px;
      border-radius: 20px;
      background-image: linear-gradient(135deg, #d7edff  0%, #16407000 70%);
    }
    .xx_modal_mod{
      margin: 5px;
      padding: 5px;
      background-color: #ffffff;
      border-radius: 4px;
      box-shadow: 3px 3px 11px 0px #cccccc;
      height: 120px;
      .mod_top_box{
        display: flex;
        margin-top: 10px;
        .mod_right_box{
          height: 60px;
          a{
            font-size: 16px;
            color: #5a98d5
          }
          span{
            font-size: 30px;
            font-weight: bold;
            color: #5a98d5;
            line-height: 40px;
            display: block;
          }
        }
        .mod_img_box{
          margin: 15px;
          width: 60px;
          height: 60px;
          background: url(./assets/xx_img_blue.png) no-repeat;
          background-size: contain;
        }
      }
      .mod_bottom_box{
        height: 20px;
        background: url(./assets/xx_img_tiao.png) no-repeat;
        background-size: 100% 100%;
      }
    }
  }
}
//滤镜 
.img_blue{
  filter: hue-rotate(10deg) brightness(1.1) contrast(1.2);
}
.img_pur{
  filter: hue-rotate(127deg) brightness(1.1) contrast(1.2);
}
.img_green{
  filter: hue-rotate(286deg) brightness(1.1) contrast(1.2);
}
.img_yellow{
  filter: hue-rotate(198deg) brightness(1.1) contrast(1.2);
}
//底部提示
.xx_modal_tips{
  height: 50px;
  width: 100%;
  line-height: 50px;
  color: #0f538d;
  text-align: center;
}
</style>

实例: 

 全部资料:https://download.csdn.net/download/galaxyJING/88998544?spm=1001.2014.3001.5503

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

LXXgalaxy

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值