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 分钟前
一些常用名词
开发语言·前端·javascript
晴天163 分钟前
前端打包工具全景解析
前端
晴天165 分钟前
Vite vs Webpack 全方位对比
前端·webpack·node.js
体毛旺盛的猿7 分钟前
HarmonyOS开发面试题
前端·华为·harmonyos
anOnion21 分钟前
构建无障碍组件之Landmarks Pattern
前端·html·交互设计
牧瀬クリスだ23 分钟前
前端三件套基础之JS!!!!
前端·javascript
风骏时光牛马26 分钟前
提示词工程:大模型交互的核心塑造技术
前端
单线程_0129 分钟前
从案例分析 Vue3 Tokenizer+Parser 源码四
前端·javascript·vue.js
31 分钟前
Python 图片处理:裁剪缩放至300×200,格式JPG/PNG/GIF,控制大小≤100KB
linux·前端·python
_阿南_8 小时前
项目中新增给AI制定的代码规范
前端·程序员