【css 文字加背景图叠加效果】

css 文字加背景图叠加效果

html代码

<h1 class="title">这是一个文字加背景图叠加</h1>

css代码


.title{
    
    
	width: 100%;
	background-image: url(https://little-dev.elloworld.cn/Ju/IPSA_game_PC/assets/guide_p1.296a238f.jpg);
	background-repeat: no-repeat;
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
}

效果图
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_36678194/article/details/129486752