-1
여기 누군가가 내가 지금 가지고있는 코딩 문제를 해결할 수 있는지 궁금합니다. 저는 코딩을 시작한 지 얼마되지 않았지만 위치 고정 헤더를 만들고 카운트 다운이 0이 된 후에 수정을 중단하도록 요청 받았습니다. 그래서 다시 페이지 상단으로 돌아 가야했습니다. 나는 카운트 다운과 고정 헤더를 만들 수 있었지만 카운트 다운이 0이 된 후에는 카운트 다운을 멈출 수 없었다. 여기 누군가가 내가 어떻게해야하는지에 대한 아이디어가 있습니까? .카운트 다운 후 고정 헤더 중지
내가 지금까지 가지고있는 스크립트를
var timeleft = 5,
downloadTimer = setInterval(function() {
timeleft--;
document.getElementById("countdowntimer").textContent = timeleft;
if(timeleft <= 0) {
clearInterval(downloadTimer);
}
}, 1000);
/** * Eric Meyer's Reset CSS v2.0
(http://meyerweb.com/eric/tools/css/reset/) * http://cssreset.com */
html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p,
blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em,
img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,b, u,
i, center,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table,
caption, tbody, tfoot, thead, tr, th, td,article, aside, canvas, details,
embed, figure, figcaption, footer, header, hgroup, menu, nav, output,
ruby, section, summary,time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
header{
position: fixed;
text-align: center;
font-size: 16px;
line-height: 200px;
height: 200px;
width: 100%;
background: #335C7D;
color: #a3ff00;
font-family: 'PT Sans', sans-serif;
// set animation
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
}
<header>
<h1>
<div>
<img src="http://scripts.semilo.com/mitchel/TEST_728x90.png"width="728" height="90"/>
</div>
<div style="height:20; width:100%; text-align:center; font-size: 14px; color:#a3ff00; font-style: sansita">
Deze ad verdwijnt in <span id="countdowntimer">5 </span> Seconds</div>
</h1>
</header>
<img src="http://scripts.semilo.com/alex/semilologo.png" width="782" height="2000" alt="Big Image" />
감사합니다! 이것은 내가 잃어버린 것이었다. – Mitchel