배경이미지위의 시계 채택완료
짱구짱구
2년 전
조회 1,896
https://sir.kr/qa/513735?&vpage=1#answer_513741
의 소스에 위 시계를
아래경로의 이미지를 넣어서
<div class="container">
<img class="slide1" src="c:\\display/clock/hour_paper.jpg">
<h1 id="current-time"></h1>
</div>
배경이미지 위에 나오게 하고 싶습니다.
고수님들 부탁 드립니다.
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
2년 전
</p>
<p><link href="<a href="https://fonts.googleapis.com/css2?family=Lato&display=swap"" target="_blank" rel="noopener noreferrer">https://fonts.googleapis.com/css2?family=Lato&display=swap"</a> rel="stylesheet">
<style>
#todayDiv { width:500px; height:360px; padding-top:200px; box-sizing:border-box; background-image:url('<a href="https://blog.kakaocdn.net/dn/GQ8UO/btstX5Sj7ZD/ENNGXlq7MZFe9G9dPdVAQ0/img.png');" target="_blank" rel="noopener noreferrer">https://blog.kakaocdn.net/dn/GQ8UO/btstX5Sj7ZD/ENNGXlq7MZFe9G9dPdVAQ0/img.png');</a> background-size:cover; background-position:center; margin:0 auto; }
#todayTable { color:#ffffff; font-family:Lato; font-weight:bold; margin:0 auto; }
#todayHead { text-align:center; padding:0px; font-size:4rem; }
#todayTail { text-align:center; padding:0px ; font-size:2rem; }
#todayTail span { font-size:1.2rem; }
</style>
<script>
weekKr = "일월화수목금토";
document.write(`
<div id="todayDiv">
<table id="todayTable">
<tr><td id="todayHead"></td></tr>
<tr><td id="todayTail"></td></tr>
</table>
</div>
`);
function todayMode() {
todayTime = new Date();
todayHead.innerText = String(todayTime).split(" ")[4];
currentYear = todayTime.getFullYear() + ".";
currentMonth = ("0" + (todayTime.getMonth() + 1)).slice(-2) + ".";
currentDay = ("0" + todayTime.getDate()).slice(-2) + ".";
currentWeek = weekKr[todayTime.getDay()] + "<span>요일</span>";
todayTail.innerHTML = currentYear + currentMonth + currentDay + currentWeek;
}
todayMode();
setInterval(todayMode, 1000);
</script></p>
<p>
https://wittazzurri.com/editor/html_editor.php 에서 확인해보세요.
세세한 css 설명은 생략합니다.^^
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
�
짱구짱구
2년 전
�
비타주리
2년 전
죄송합니다만 저는 여기까지만 할게요.^^
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
나오지를 않네여...ㅠㅠ
https://sir.kr/qa/513536?page=1&page=1&unanswered=0&unadopted=0&adopted=0&s_tag=&cwin=&vsst=&vpage=1#c_513774
와 같은 현상 입니다...ㅠㅠ