css高斯模糊背景,使用filter!

shink 2021-11-19 原文


css高斯模糊背景,使用filter!

一。html代码

<div class=”information “>
  <div class=”information_blur” :style=”{\’background\’: `url(${backgroundUrl})`}”></div> // 模糊背景图片必须和内容平级,不然内容内的字体也会模糊
  // 背景内的内容
  <div class=”information_head “>
    <img class=”head_portrait” @click=”openDialog” src=”~@/assets/img/photo9.jpg”>
    <div class=”head_portrait_notice”>
      <p @click=”openDialog”>海派星派大星 <span>A+</span></p>
      <div class=”notice”>五根松咪哒表演系官方圈子,欢迎热爱唱歌的小姐姐加入</div>
    </div>
  </div>
  <div class=”fans”>
     <div class=”center”>
        <span class=”number”>9999</span>
        <span class=”text”>圈友</span>
     </div>
     <div class=”center” >
        <span class=”number1″>12w</span>
        <span class=”text1″>粉丝</span>
     </div>
     <div class=”center” >
        <span class=”number2″>1669</span>
        <span class=”text2″>活跃值</span>
     </div>
     <div class=”center”>
        <span class=”number3″>231</span>
       <span class=”text3″>动态</span>
     </div>
   </div>
</div>
二。css 代码
.information
display: flex
flex-direction: column
width: 7.44rem
height:3.20rem
margin-top: 1.11rem
border: 1px solid #fff
.information_blur
width: 7.44rem
height:3.20rem
background-size: cover
background-position: center
position: absolute
filter: blur(10px) //模糊度自己设置
.information_head
display: flex
flex-direction: row
height: 1.48rem
margin-top: 0.43rem
position: relative
.head_portrait
border-radius:0.15rem
margin-left: 0.32rem
width: 1.48rem
height: 1.48rem
.head_portrait_notice
display: flex
flex-direction: column
margin-left: 0.15rem
margin-top: 0.25rem
p
height:0.34rem
font-size:0.36rem
font-family:PingFang-SC-Medium
font-weight:500
color:rgba(51,51,51,1)
line-height:0.47rem
span
display: inline
margin-left: 0.15rem
width:0.57rem
height:0.22rem
font-size:0.3rem
font-family:PingFang-SC-Medium
font-weight:500
color:rgba(245,126,73,1)
line-height:0.48rem
.notice
width:4.98rem
margin-top: 0.15rem
font-size:0.24rem
font-family:PingFang-SC-Medium
font-weight:500
color:rgba(102,102,102,1)
overflow:hidden
display: -webkit-box
-webkit-line-clamp: 2
-webkit-box-orient: vertical
.fans
display: flex
justify-content: space-around
width: 7.43rem
height: 0.7rem
margin-top: 0.25rem
position: relative
.center
text-align: center
width: 0.8rem
height: 0.7rem
.number
width:0.7rem
font-size:0.32rem
font-family:PingFang-SC-Medium
color:rgba(51,51,51,1)
.text
position: relative
margin-left:0.1rem
width:0.6rem
height:0.23rem
font-size:0.24rem
font-family:PingFang-SC-Medium
color:rgba(153,153,153,1)
.number1
width:0.74rem
font-size:0.32rem
font-family:PingFang-SC-Medium
font-weight:500
color:rgba(51,51,51,1)
.text1
position: relative
margin-left:0.1rem
width:0.6rem
height:0.23rem
font-size:0.24rem
font-family:PingFang-SC-Medium
color:rgba(153,153,153,1)
.number2
width:0.74rem
font-size:0.32rem
font-family:PingFang-SC-Medium
font-weight:500
color:rgba(51,51,51,1)
.text2
position: relative
margin-left: -0.05rem
width:0.9rem
height:0.23rem
font-size:0.24rem
font-family:PingFang-SC-Medium
color:rgba(153,153,153,1)
.number3
width:0.74rem
font-size:0.32rem
font-family:PingFang-SC-Medium
font-weight:500
color:rgba(51,51,51,1)
.text3
position: relative
margin-left:0.1rem
width:0.6rem
height:0.23rem
font-size:0.24rem
font-family:PingFang-SC-Medium
color:rgba(153,153,153,1)
三。效果图

 

发表于
2019-06-19 11:03 
渣男孩 
阅读(4037
评论(1
编辑 
收藏 
举报

 

版权声明:本文为shink原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/shink/p/11050121.html

css高斯模糊背景,使用filter!的更多相关文章

随机推荐

  1. finished with exit code -1073740791 (0xC0000409)解决方案

    在用keras框架跑NER的train时,遇到无错跳出finished with exit code -107 […]...

  2. 1小时打造HaaS版小小蛮驴智能车

    简介: 2020年云栖大会上,阿里云发布了一款机器人“小蛮驴”,瞬间激起千层浪,无人车,智能物流,机器人等一些 […]...

  3. 比较常见的几种代理ip类型

    1.HTTP代理服务器   代理服务器英文全称是Proxy Server,他的功能就是代理网络用户去获得网络信 […]...

  4. Mac OS 10.12 – 在VMwear Workstation12.5.2中以两种方式进入恢复模式(Recovery)!!!

    注意:如果你打算安装Mac OS10.12 到虚拟机里面学习,那么我强烈建议你在没有安装任何其它软件之前,按照 […]...

  5. 这个案例写出来,还怕跟面试官扯不明白 OAuth2 登录流程?

    昨天和小伙伴们介绍了 OAuth2 的基本概念,在讲解 Spring Cloud Security OAuth […]...

  6. Linux curl命令参数详解

    linux curl是通过url语法在命令行下上传或下载文件的工具软件,它支持http,https,ftp,f […]...

  7. Numpy&Pandas

    Numpy & Pandas 简介 此篇笔记参考来源为《莫烦Python》 运算速度快:numpy 和 […]...

  8. Https详解

    一、定义 Hypertext Transfer Protocol Secure(超文本传输安全协议,缩写:HT […]...

展开目录

目录导航