短视频app制作,对于需要付费的内功,实现模糊遮罩效果

短视频app制作,对于需要付费的内功,实现模糊遮罩效果
css实现:

.tip {
    
    
	position: relative;
	top: 80px;
	font-weight: 700;
	text-align: center;
	font-size: 16px;
	color: #2878ff;
}

兼容性:

由于用ie不支持::after这种伪类,所以ie中不支持此方法,ie中可以配合模糊化图片进行处理。

完整代码示例:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>内容模糊化</title>
		<style type="text/css">
			* {
    
    
				padding: 0;
				margin: 0;
				list-style: none;
			}
			.wraper {
    
    
				position: relative;
				width: 100px;
				margin: 100px auto;
				padding: 0 20px;
				background-color: pink;
			}
			ul {
    
    
				width: 100%;
			}
			ul li {
    
    
				height: 40px;
				line-height: 40px;
			}
			.tip {
    
    
				position: relative;
				top: 80px;
				font-weight: 700;
				text-align: center;
				font-size: 16px;
				color: #2878ff;
			}
			.blur {
    
    
				position: relative;
				filter: blur(5px);
				user-select: none;
			}
			.blur::after {
    
    
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				content: '';
				display: block;
				background: rgba(255, 253, 253, 0.2);
			}
		</style>
	</head>
	<body>
		<div class="wraper">
			<p class="tip">开通VIP查看</p>
			<ul class="blur">
			</ul>
		</div>
	</body>
</html>

以上就是 短视频app制作,对于需要付费的内功,实现模糊遮罩效果,更多内容欢迎关注之后的文章

猜你喜欢

转载自blog.csdn.net/yb1314111/article/details/125332694
今日推荐