mirror of
https://github.com/jarodlee/web_tool.git
synced 2026-12-07 05:17:41 +08:00
对关于页做一些chatgpt的优化
This commit is contained in:
@@ -57,8 +57,60 @@
|
||||
}
|
||||
a:hover { text-decoration: underline; }
|
||||
</style>
|
||||
<style>
|
||||
body.dark {
|
||||
background: #121212;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body.dark .login-box,
|
||||
body.dark .about {
|
||||
background: #1e1e1e;
|
||||
box-shadow: 0 4px 12px rgba(255,255,255,0.05);
|
||||
}
|
||||
.bg {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
opacity: 0.25;
|
||||
z-index: -1;
|
||||
}
|
||||
.theme-toggle {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
padding: 6px 12px;
|
||||
background: #0078ff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
body.dark .theme-toggle {
|
||||
background: #444;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const images = [
|
||||
'https://picsum.photos/1200/2400?random=1',
|
||||
'https://picsum.photos/1200/2400?random=2',
|
||||
'https://picsum.photos/1200/2400?random=3'
|
||||
];
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.querySelector('.bg').style.backgroundImage = `url(${images[Math.floor(Math.random()*images.length)]})`;
|
||||
const themeBtn = document.getElementById('themeToggle');
|
||||
themeBtn.onclick = () => {
|
||||
document.body.classList.toggle('dark');
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="bg"></div>
|
||||
<button id="themeToggle" class="theme-toggle">切换主题</button>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1>高花亭小学网络学伴</h1>
|
||||
|
||||
Reference in New Issue
Block a user