直播电商平台开发,CSS 3之模糊与透明色背景

直播电商平台开发,CSS 3之模糊与透明色背景

1.模糊

blue 滤镜能实现页面模糊效果,即在一个方向上的运动模糊;

语法格式如下所示:

 


blue(radius)

 

radius 参数表示接单单个参数半径,该参数半径以长度形式保存模糊半径;

 

例子 1:

 


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>模糊</title>
<style type="text/css">
img{
height:350px;
width: 450px;
}
</style>
</head>
<body>
<div class="e">
<p style="font-size: 30px;font-weight: bold;color: blue;">Blur 滤镜效果图</p>
</div>
原图<img src="img/1.jpg" >
模糊1<img src="img/1.jpg" style="filter: blur(11px);"><br>
模糊2<img src="img/1.jpg" style="filter: blur(6px);">
</body>
</html>

 

 2. 透明色背景

例子2:

 


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Chroma滤镜</title>
<style>
div{
width: 550px;
height: 550px;
line-height: 35px;
text-align: center;
margin: 0 auto;
}
.d1{
background: rgb(220, 38, 38, 1);
}
.d2{
background: rgb(220, 38, 38, 0.7);/* 或使用rgba */

p{
font-size: 30pt;
font-weight: bold;
}
</style>
</head>
<body>
<div>
<p class="d1">未使用透明色背景效果前</p>
<p class="d2">使用透明色背景效果后</p>
</div>
</body>
</html>

 

 以上就是 直播电商平台开发,CSS 3之模糊与透明色背景,更多内容欢迎关注之后的文章

 

posted @ 2022-11-21 14:11  云豹科技-苏凌霄  阅读(56)  评论(0)    收藏  举报