간단하게 현재 시간을 보여주는 웹 페이지를 만들어 봤습니다.
샘플 페이지: https://zel.kr
<!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;
background-color: #f0f2f5;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.time-container {
background-color: white;
padding: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
text-align: center;
}
.time {
font-size: 3rem;
font-weight: bold;
color: #1a73e8;
margin-bottom: 1rem;
}
.date {
font-size: 1.5rem;
color: #5f6368;
}
.clock-icon {
font-size: 2rem;
margin-bottom: 1rem;
color: #1a73e8;
}
</style>
</head>
<body>
<?php
date_default_timezone_set('Asia/Seoul');
$current_time = date('H:i:s');
$current_date = date('Y년 n월 j일 l');
?>
<div class="time-container">
<div class="clock-icon">🕐</div>
<div class="time"><?php echo $current_time; ?></div>
<div class="date"><?php echo $current_date; ?></div>
</div>
<script>
// 1초마다 페이지 새로고침
setTimeout(function() {
window.location.reload();
}, 1000);
</script>
</body>
</html>
Short URL: https://webworxs.com/cqby