- 打卡等级:偶尔看看
- 打卡总天数:8
- 打卡月天数:0
- 打卡总奖励:18
- 最近打卡:2024-10-16 19:11:21
官方
- 积分
- 163
|
演示图:
代码:
- <style>
- body {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100vh;
- margin: 0;
- background-color: #f0f0f0;
- }
- .grid-container {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- grid-gap: 10px;
- width: 80%;
- max-width: 600px;
- }
- .grid-item {
- background: -webkit-linear-gradient(left,
- #ffffff,
- #ff0000 6.26%,
- #ff7d00 12.5%,
- #ffff00 18.75%,
- #00ff00 26%,
- #00ffff 31.26%,
- #0000ff 37.5%,
- #ff00ff 43.75%,
- #ffff00 50%,
- #ff0000 56.26%,
- #ff7d00 62.5%,
- #ffff00 68.75%,
- #00ff00 75%,
- #00ffff 81.26%,
- #0000ff 87.5%,
- #ff00ff 93.75%,
- #ffff00 100%);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- background-size: 200% 100%;
- animation: masked-animation 2s infinite linear;
- padding: 20px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 12px; /* Adjusted font size */
- font-weight: bold;
- color: #333;
- text-align: center;
- }
- @keyframes masked-animation {
- 0% {
- background-position: 0 0;
- }
- 100% {
- background-position: -100%, 0;
- }
- }
- </style>
- </head>
- <body>
- <div class="grid-container">
- <div class="grid-item">广告1</div>
- <div class="grid-item">广告2</div>
- <div class="grid-item">广告3</div>
- <div class="grid-item">广告4</div>
- <div class="grid-item">广告5</div>
- <div class="grid-item">广告6</div>
- <div class="grid-item">广告7</div>
- <div class="grid-item">广告8</div>
- <div class="grid-item">广告9</div>
- </div>
复制代码
|
|