73 lines
2.8 KiB
HTML
73 lines
2.8 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="zh-CN">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>工具类网站</title>
|
||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css">
|
||
|
<style>
|
||
|
body {
|
||
|
margin: 0;
|
||
|
font-family: Arial, sans-serif;
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: flex-start; /* 对齐到顶部 */
|
||
|
height: 100vh;
|
||
|
padding-top: 50px; /* 距离上边距50像素 */
|
||
|
}
|
||
|
.tile-container {
|
||
|
display: grid;
|
||
|
grid-template-columns: repeat(8, 1fr); /* 8列均分 */
|
||
|
gap: 2%; /* 磁贴之间的间距,按比例 */
|
||
|
width: 80vw; /* 容器宽度为视口宽度的80% */
|
||
|
}
|
||
|
.tile {
|
||
|
width: 10vw; /* 宽度为视口宽度的10% */
|
||
|
height: 10vw; /* 高度为视口宽度的10% */
|
||
|
color: #fff;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
text-align: center;
|
||
|
border-radius: 10px;
|
||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||
|
cursor: pointer;
|
||
|
transition: transform 0.3s, box-shadow 0.3s;
|
||
|
}
|
||
|
.tile:hover {
|
||
|
transform: scale(1.05);
|
||
|
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
|
||
|
}
|
||
|
.tile i {
|
||
|
font-size: 3vw; /* 图标大小为磁贴的30% */
|
||
|
margin-top: 10%; /* 保证图标在磁贴中间 */
|
||
|
}
|
||
|
.tile span {
|
||
|
font-size: 0.8vw; /* 工具名称字体大小适应磁贴 */
|
||
|
margin-top: 10px;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="tile-container">
|
||
|
<div class="tile" style="background-color: #0078D7;" onclick="window.open('tools/otp.html', '_blank')">
|
||
|
<i class="mdi mdi-qrcode"></i>
|
||
|
<span>OTP 认证<br>二维码生成器</span>
|
||
|
</div>
|
||
|
<div class="tile" style="background-color: #28a745; display: none;" onclick="window.open('tool2.html', '_blank')">
|
||
|
<i class="mdi mdi-cogs"></i>
|
||
|
<span>工具2</span>
|
||
|
</div>
|
||
|
<div class="tile" style="background-color: #dc3545; display: none;" onclick="window.open('tool3.html', '_blank')">
|
||
|
<i class="mdi mdi-bell"></i>
|
||
|
<span>工具3</span>
|
||
|
</div>
|
||
|
<div class="tile" style="background-color: #fd7e14; display: none;" onclick="window.open('tool4.html', '_blank')">
|
||
|
<i class="mdi mdi-calendar"></i>
|
||
|
<span>工具4</span>
|
||
|
</div>
|
||
|
<!-- 这里可以添加更多工具的磁贴,每个磁贴可以设置不同的背景颜色 -->
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|