当前位置:网站首页>Realize the effect of changing some colors of a paragraph of text
Realize the effect of changing some colors of a paragraph of text
2022-07-29 07:42:00 【Pontoon bridge】
Realize the effect of changing some colors of a paragraph of text
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Pseudo class implementation changes part of the color of a text </title>
<style> .hf {
display: inline-block; font-size: 80px; line-height: 80px; color: #000; position: relative; overflow: hidden; whitewater-space: pre; /* Processing spaces */ } .hf:before {
position: absolute; left: 0; top: 0; color: #f00; display: block; width: 30%; /* If you want to change half the text , Is set 50%*/ content: attr(data-content); /* Dynamic acquisition of pseudo elements */ overflow: hidden; } </style>
</head>
<body>
<div>
<span class="hf" data-content="W">W</span>
<span class="hf" data-content="e">e</span>
<span class="hf" data-content="b">b</span>
<span class="hf" data-content=" front "> front </span>
<span class="hf" data-content=" End "> End </span>
</div>
</body>
</html>

边栏推荐
猜你喜欢

The new generation of public chain attacks the "Impossible Triangle"
![【暑期每日一题】洛谷 P6461 [COCI2006-2007#5] TRIK](/img/bf/c0e03f1bf477730f0b3661b3256d1d.png)
【暑期每日一题】洛谷 P6461 [COCI2006-2007#5] TRIK

Using C language to skillfully realize the chess game -- Sanzi chess

207.课程表

Zero technology is deeply involved in the development of privacy computing financial scenario standards of the ICT Institute

2022年深圳杯A题破除“尖叫效应”与“回声室效应”走出“信息茧房”

多线程购物

QT连接两个qslite数据库报错QSqlQuery::exec: database not open

stm32 操作W25Q256 W25Q16 spi flash

【深度学习】数据准备-pytorch自定义图像分割类数据集加载
随机推荐
Multi thread shopping
IonIcons图标大全
RoBERTa:A Robustly Optimized BERT Pretraining Approach
Prometheus and grafana
The new generation of public chain attacks the "Impossible Triangle"
7-2 calculate the area and perimeter of a regular pentagon (25 points)
[summer daily question] Luogu p4413 [coci2006-2007 2] R2
Sort out the two NFT pricing paradigms and four solutions on the market
Meeting notice of OA project (Query & whether to attend the meeting & feedback details)
小D的刺绣
Output 1234 three digits without repetition
【深度学习】数据准备-pytorch自定义图像分割类数据集加载
LANDSCAPE
As long as flutter is data, it will be judged null
梳理市面上的2大NFT定价范式和4种解决方案
Introduction to logback appender
国内数字藏品的乱象与未来
zip gzip tar压缩进阶版
Gin abort cannot prevent subsequent code problems
NFT 的 10 种实际用途