当前位置:网站首页>学习探索-给字体设置前景色
学习探索-给字体设置前景色
2022-08-04 16:58:00 【miao_zz】
效果示例图
代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>给字体设置前景色</title>
<style type="text/css">
* {
padding: 0px;
margin: 0px;
box-sizing: border-box;
}
html,
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.clip {
display: inline-block;
font-size: 36px;
background: linear-gradient(to right, #bc2c24, #7533ca);
/*
* text:背景被裁剪成文字的前景色
*/
background-clip: text;
-moz-background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
</style>
</head>
<body>
<div class="clip">HELLO WRODL!</div>
</body>
</html>
边栏推荐
猜你喜欢
湖北移动HG680-LV_S905L3B_线刷固件包
浙江移动咪咕MGV2000-K4_ZJ_S905l2_7661_线刷固件包
软件基础的理论
一张图片怎么旋转90度。利用ps
How to convert an int attribute into a string in the json format returned by the Go language gin framework?
Heilongjiang Mobile New Magic Hundred Box M411A_2+8_S905L3A_wire brush firmware package
ctfshow 萌新web1-21
不需要服务器,教你仅用30行代码搞定实时健康码识别
《分布式云最佳实践》分论坛,8月11日深圳见
移动魔百盒CM211-1_YS代工_S905L3B_RTL8822C_线刷固件包
随机推荐
LeetCode 0167. 两数之和 II - 输入有序数组
Hubei Mobile HG680-LV_S905L3B_wire brush firmware package
How to convert an int attribute into a string in the json format returned by the Go language gin framework?
机器学习(十九):梯度提升回归(GBR)
【小程序】实现发动态功能
移动魔百盒CM211-1_YS代工_S905L3B_RTL8822C_线刷固件包
【商家联盟】云平台—异业联盟,打造线上线下商业相结合的系统
拼多多详情API接口深度解读
麒麟信安石勇博士荣获openEuler社区年度开源贡献之星
WPF 光标初始化的时候 temp 文件夹满了无法创建
移动平台助力推进智慧型科研院所信息化建设
Minecraft 服务器安装Forge 并添加Mod
Copycat CNN: Stealing Knowledge by Persuading Confession with Random Non-Labeled Data阅读心得
机器学习(十六):主成成分分析(PCA)
华为云数据治理生产线DataArts,让“数据‘慧’说话”
Boost库学习笔记(一)安装与配置
LeetCode 0168. Excel表列名称
嵌入式系统驱动初级【6】——内核定时器
win11如何退出安全模式
谷歌开发者社区推荐:《Jetpack Compose 从入门到实战》新书上架,带你踏上 Compose 开发之旅~