css文字镂空加描边

css文字镂空加描边

html 复制代码
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>文字镂空</title>
		<style>
			/* 公用样式 */
			html,body{width: 100%;height: 100%;position: relative;}
			/* html{overflow-y: scroll;} */
			*{margin:0; padding:0;color:#555; font-size:12px; font-family:"microsoft yahei"; line-height:1;font-weight: normal;letter-spacing: 0.3px;list-style:none;font-style: normal;font-size: 100%;}
			a,li,ul{list-style:none;text-decoration:none}
			ul li a{font-size:16px;color:#333}
			body{width:100%;height:100%;position:relative}
			img{display: block;}
			.textbox{width: 100%;height: 100%;display: flex;display: -webkit-flex;align-items: center;-webkit-align-items: center;justify-content: center;-webkit-justify-content: center;}
			.textbox01{background-color: aliceblue;}
			.textbox02{background-color: beige;}
			.textbox P{font-size: 260px;color: #fff;-webkit-background-clip: text;-webkit-text-fill-color: transparent;background-size: cover;background-repeat: no-repeat;background-attachment:fixed;font-weight: 800;-webkit-text-stroke: 3px #7893f4;}
			.textbox01 P{background-image: url(img/img03.jpg);}
			.textbox02 P{background-image: url(img/img11.jpg);}
		</style>
	</head>
	<body>
		
		<div class="textbox textbox01">
			<p>千与千寻</p>
		</div>
		<div class="textbox textbox02">
			<p>龙猫</p>
		</div>
	</body>
</html>
相关推荐
Emily156853598701 小时前
Emerson 1C31129G03 Analog Input Module
java·开发语言·前端·plc·emerson·1c31129g03·input module
To_OC6 小时前
面试被问了三回三栏布局,这次我终于把 BFC 那层窗户纸捅破了
前端·css·面试
To_OC6 小时前
啃完 TS 工具类型我发现:Pick 和 Omit 原来就是一层窗户纸
前端·面试·typescript
风月说与山鬼7 小时前
三、大括号语法
前端·react.js
kyriewen8 小时前
我把最常踩的8个CORS跨域报错整理了一遍——第8个去年还不存在
前端·javascript
Csvn8 小时前
🕰️ 闭包 + setTimeout 的 5 个经典陷阱:为什么定时器看到的永远不是最新的值?
前端
lilian2339 小时前
Harmony os 技术实战|拼豆制图27:用单字符编码承载 50 张 70×70 图纸
前端·数据库·华为·harmonyos
CarIise9 小时前
CSS选择器与样式关联
前端·css·tensorflow
里欧跑得慢10 小时前
CSS 模块化架构的演进:BEM、CSS Modules 到 CSS-in-JS 的反思
前端·css·flutter·web·css-in-js