Files
aiagent/test/index.html

105 lines
2.9 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>欢迎页面</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #333;
}
.card {
background: #fff;
border-radius: 20px;
padding: 40px 50px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
text-align: center;
max-width: 480px;
width: 90%;
transition: transform 0.3s ease;
}
.card:hover {
transform: translateY(-5px);
}
h1 {
font-size: 28px;
color: #4a4a4a;
margin-bottom: 12px;
}
.icon {
font-size: 64px;
margin-bottom: 16px;
}
p {
font-size: 16px;
color: #777;
line-height: 1.8;
margin-bottom: 24px;
}
.btn {
display: inline-block;
padding: 12px 36px;
background: linear-gradient(135deg, #667eea, #764ba2);
color: #fff;
border: none;
border-radius: 50px;
font-size: 16px;
cursor: pointer;
transition: opacity 0.3s, transform 0.2s;
text-decoration: none;
}
.btn:hover {
opacity: 0.9;
transform: scale(1.05);
}
.btn:active {
transform: scale(0.95);
}
.time {
margin-top: 20px;
font-size: 14px;
color: #aaa;
}
</style>
</head>
<body>
<div class="card">
<div class="icon">🚀</div>
<h1>Hello, World!</h1>
<p>这是一个简单的 HTML 页面,<br>由 CodeBot 为你生成。</p>
<button class="btn" onclick="showMessage()">点我试试</button>
<div class="time" id="timeDisplay"></div>
</div>
<script>
// 显示当前时间
function updateTime() {
const now = new Date();
const timeStr = now.toLocaleString('zh-CN', {
year: 'numeric', month: '2-digit', day: '2-digit',
hour: '2-digit', minute: '2-digit', second: '2-digit'
});
document.getElementById('timeDisplay').textContent = '当前时间:' + timeStr;
}
updateTime();
setInterval(updateTime, 1000);
// 按钮点击事件
function showMessage() {
alert('🎉 你好!欢迎来到这个页面!');
}
</script>
</body>
</html>