|
|
<style type="text/css">
.gg {
font-family: '微软雅黑';
font-weight: 900;
font-size: 4rem;
text-align: center;
color: transparent;
background-color: #e8a95b;
background-clip: text;
-webkit-background-clip: text;
position: relative;
}
.gg::after {
content: attr(data-text);
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(120deg, transparent 0%, transparent 6rem, white 11rem, transparent 11.15rem, transparent 15rem, rgba(255, 255, 255, 0.3) 20rem, transparent 25rem, transparent 27rem, rgba(255, 255, 255, 0.6) 32rem, white 33rem, rgba(255, 255, 255, 0.3) 33.15rem, transparent 38rem, transparent 40rem, rgba(255, 255, 255, 0.3) 45rem, transparent 50rem, transparent 100%);
background-clip: text;
-webkit-background-clip: text;
background-size: 150% 100%;
background-repeat: no-repeat;
animation: shine 5s infinite linear;
}
@keyframes shine {
0% { background-position: 50% 0; }
100% { background-position: -190% 0; }
}
</style>
<div style="margin: auto; width: 700px; height: 200px; background: #000; line-height: 200px;">
<p class="gg" data-text="君不見高堂明鏡悲白髮">君不見高堂明鏡悲白髮</p>
</div>
|
|