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>
相关推荐
parade岁月14 分钟前
VTable Guild 3.0.0 发布,面向 Vue 3 的 ProTable 式业务表格
前端
xurileidian30 分钟前
第 17 篇 · 边玩边学Python · for 遍历 enumerate 与 zip
java·前端·python
掘金安东尼1 小时前
更多审查智能体,更少盲区:GitHub Copilot 代码审查是怎么做的
前端·github copilot
Hilaku4 小时前
2026 年了,jQuery 真的该死了吗?
前端·javascript·程序员
zach4 小时前
吃透 React setState 同步异步之谜:从批量更新、事件循环到版本演进的完整拆解
前端·react.js
不服老的小黑哥4 小时前
02-从 pnpm dev 到 Spring Boot 启动:后端服务到底怎么跑起来?
前端
htzyl2064 小时前
javaScript——this 的四种绑定:为什么箭头函数改不了它
前端·javascript
欧雷殿4 小时前
做自己的第一位客户:一人公司的数据治理公开实践
前端·ai编程·团队管理
掘金安东尼5 小时前
换上 Gemini 4 Neon 之后,我改了哪些上下文工程大模型
前端
涛涛ing6 小时前
我把项目里的 Zustand 全删了:代码量减半,Bug 少了,性能还起飞了
前端