assign
This commit is contained in:
85
asign.html
Normal file
85
asign.html
Normal file
@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>인사말 페이지</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
text-align: center;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
.light-mode {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
.dark-mode {
|
||||
background-color: #333333;
|
||||
color: #ffffff;
|
||||
}
|
||||
.container {
|
||||
margin-top: 20vh;
|
||||
}
|
||||
button {
|
||||
padding: 10px 20px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.light-mode button {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
}
|
||||
.dark-mode button {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
table {
|
||||
margin: 20px auto;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid #000;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.dark-mode th, .dark-mode td {
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="light-mode">
|
||||
<div class="container">
|
||||
<h1>안녕하세요! 반갑습니다.</h1>
|
||||
<button onclick="toggleTheme()">다크 모드 전환</button>
|
||||
<table>
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>url</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>test page</td>
|
||||
<td><a href="https://assign.icurfer.com" target="_blank">https://assign.icurfer.com</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
function toggleTheme() {
|
||||
const body = document.body;
|
||||
body.classList.toggle("dark-mode");
|
||||
body.classList.toggle("light-mode");
|
||||
|
||||
const button = document.querySelector("button");
|
||||
if (body.classList.contains("dark-mode")) {
|
||||
button.textContent = "라이트 모드 전환";
|
||||
} else {
|
||||
button.textContent = "다크 모드 전환";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user