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>
相关推荐
独泪了无痕2 小时前
Vue3 Hooks使用实战解析
前端·vue.js
shawxlee4 小时前
vue3在public下封装config.js自定义配置动态数据,可在打包后直接修改,方便后端部署及后续维护
前端·javascript·经验分享·vue·团队开发·js·项目优化
用户059540174464 小时前
把记忆存储的回归测试从手工换成 Playwright + GitHub Actions,线上缺陷降低 80%
前端·css
触底反弹4 小时前
🚀 从 DOM0 级到 React 合成事件:前端事件监听的 20 年演进史
前端·react.js·面试
kyriewen4 小时前
我给前端项目的接口请求套了6层保护——才发现以前一直在裸奔
前端·javascript·面试
颜酱4 小时前
04 | 召回前置准备:搭好召回所需的四个数据库
前端·人工智能·后端
郝亚军6 小时前
如何安装webstorm、Node.js和vue CLI
前端·javascript·vue.js
IT_陈寒6 小时前
React的useEffect依赖项把我坑惨了
前端·人工智能·后端
东方小月6 小时前
从零开发一个Coding Agent:monorepo项目搭建
前端·后端·node.js
葬送的代码人生6 小时前
别再让 AI 瞎写代码了!Vibe Coding 三步法教你写出靠谱代码
前端·设计模式·架构