fix: 说明页边框流光改为实际旋转

This commit is contained in:
Nixevol
2026-11-18 10:54:12 +08:00
parent f2dd646d80
commit 8cc8c81c56
3 changed files with 108 additions and 19 deletions
+104 -19
View File
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { ref } from "vue";
import backgroundUrl from "./background.png";
const toolUrl = "https://euniv.asio.asia";
const urlEl = ref<HTMLElement | null>(null);
@@ -32,15 +33,18 @@ async function copyUrl() {
</script>
<template>
<main class="upgrade">
<section class="card">
<h1>旧版工具已失效</h1>
<p>因目标平台升级,旧版工具已失效,无法登录使用。新版工具已上线。</p>
<p>请复制下面的地址,打开浏览器,粘贴到地址栏后访问。</p>
<p ref="urlEl" class="url">{{ toolUrl }}</p>
<button type="button" class="copy" @click="copyUrl">{{ copied ? "已复制" : "复制地址" }}</button>
<p v-if="copied" class="result">已复制。请到浏览器地址栏粘贴后访问。</p>
<p v-else-if="copyFailed" class="result miss">没有复制成功,地址已选中,请手动使用 CTRL+C 复制。</p>
<main class="upgrade" :style="{ backgroundImage: `url(${backgroundUrl})` }">
<section class="wrap">
<div class="ring" aria-hidden="true"><div class="spin"></div></div>
<div class="card">
<h1>旧版工具已失效</h1>
<p>因目标平台升级,旧版工具已失效,无法登录使用。新版工具已上线。</p>
<p>请复制下面的地址,打开浏览器,粘贴到地址栏后访问。</p>
<p ref="urlEl" class="url">{{ toolUrl }}</p>
<button type="button" class="copy" @click="copyUrl">{{ copied ? "已复制" : "复制地址" }}</button>
<p v-if="copied" class="result">已复制。请到浏览器地址栏粘贴后访问。</p>
<p v-else-if="copyFailed" class="result miss">没有复制成功,地址已选中,请手动使用 CTRL+C 复制。</p>
</div>
</section>
</main>
</template>
@@ -54,16 +58,61 @@ async function copyUrl() {
place-items: center;
padding: 32px 16px;
overflow: auto;
background: #bdbec0;
background-color: #bdbec0;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
color: #1c1c1c;
font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.card {
.wrap {
position: relative;
width: min(460px, 100%);
box-shadow: 0 0 0 1px #6e7073;
}
.ring {
position: absolute;
inset: 0;
z-index: 2;
padding: 2px;
overflow: hidden;
pointer-events: none;
-webkit-mask:
linear-gradient(#000 0 0) content-box,
linear-gradient(#000 0 0);
-webkit-mask-composite: xor;
mask:
linear-gradient(#000 0 0) content-box,
linear-gradient(#000 0 0);
mask-composite: exclude;
}
.spin {
position: absolute;
left: 50%;
top: 50%;
width: 220%;
height: 220%;
background: conic-gradient(
transparent 0deg,
transparent 230deg,
#3ec4ff 292deg,
#ffffff 318deg,
#3ec4ff 344deg,
transparent 360deg
);
transform: translate(-50%, -50%);
animation: beam 2.4s linear infinite;
}
.card {
position: relative;
z-index: 1;
margin: 2px;
padding: 28px 24px;
border: 1px solid #6e7073;
background: #f3f3f3;
background: rgba(243, 243, 243, 0.2);
}
h1 {
@@ -81,26 +130,42 @@ p {
.url {
margin: 16px 0;
padding: 10px 12px;
border: 1px solid #8a8d90;
background: #fff;
border: 1px solid rgba(28, 28, 28, 0.28);
background: rgba(255, 255, 255, 0.72);
color: #1a3f73;
word-break: break-all;
user-select: all;
}
.copy {
height: 34px;
position: relative;
overflow: hidden;
height: 36px;
padding: 0 16px;
border: 1px solid #6e7073;
background: #e6e6e6;
border: 1px solid rgba(26, 63, 115, 0.55);
background: rgba(255, 255, 255, 0.55);
color: #1c1c1c;
font: inherit;
font-size: 14px;
cursor: pointer;
}
.copy::before {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(105deg, transparent 30%, rgba(127, 215, 255, 0.95) 50%, transparent 70%);
transform: translateX(-130%);
}
.copy:hover {
background: #f7f7f7;
border-color: #1a6ea8;
box-shadow: 0 0 0 1px rgba(90, 190, 255, 0.7), 0 0 16px rgba(90, 190, 255, 0.45);
}
.copy:hover::before {
transform: translateX(130%);
transition: transform 0.45s ease;
}
.result {
@@ -111,4 +176,24 @@ p {
.miss {
color: #8a3b12;
}
@keyframes beam {
from {
transform: translate(-50%, -50%) rotate(0deg);
}
to {
transform: translate(-50%, -50%) rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
.spin {
animation: none;
transform: translate(-50%, -50%);
}
.copy:hover::before {
transition: none;
}
}
</style>
Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

+4
View File
@@ -0,0 +1,4 @@
declare module "*.png" {
const src: string;
export default src;
}