You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>403</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.container {
text-align: center;
margin: 1rem 0.5rem 0;
}
.container p {
text-transform: uppercase;
letter-spacing: 0.2rem;
font-size: 2rem;
margin: 1.5rem 0 3rem;
}
svg.keyhole {
height: 82px;
width: 82px;
opacity: 0;
visibility: hidden;
/* 为钥匙孔定义一个动画以引入默认情况下暂停的动画在JavaScript中超时运行*/
animation: showKey 0.5s 0.5s paused ease-out forwards;
}
svg.key {
height: 164px;
width: 164px;
position: absolute;
opacity: 0;
visibility: hidden;
/* 为钥匙孔定义一个动画以引入默认情况下暂停的动画在JavaScript中超时运行*/
animation: showKey 0.5s 0.5s paused ease-out forwards;
}
/* 定义关键帧动画-悬停鬼影使鬼影向右、向左移动,然后返回到其默认位置
-showKey将钥匙和钥匙孔svg引入视图
-showText、showNewText、showFinalText显示不同的字符串*/
@keyframes hoverGhost {
25% {
transform: translateX(20vw);
}
75% {
transform: translateX(-20vw);
}
}
@keyframes showKey {
to {
opacity: 1;
visibility: visible;
}
}
</style>
</head>
<body>
<!-- 在一个容器中包括一个标题、段落和锁眼的svg -->
<div class="container">
<h1>请安装vpn并且保持登录状态</h1>
<p>access not granted</p>
<svg class="keyhole">
<use href="#keyhole"/>
</svg>
</div>
<!-- 在容器外部使它们相对于主体绝对定位包括一个用于钥匙的svg和一个用于鬼影的svg -->
<svg class="key">
<use href="#key"/>
</svg>
<!--
将svg嵌套在div中为svg和div提供相同的类div和svg在通过transform属性转换元素时表现不同
从而在文本包含在div上的伪元素中和svg之间提供了很好的距离
-->
<div class="ghost">
<svg class="ghost">
<use href="#ghost"/>
</svg>
</div>
</body>
</html>