-1
ここに誰かが私が現時点で持っているコーディングの問題を手伝ってくれたかどうか疑問に思っていました。私はちょうどコーディングを始めましたが、カウントダウンがゼロになったあと、固定ヘッダーを作成して修正を停止するように求められました。だから、もう一度ページの先頭に戻る必要がありました。私はダウンカウントと固定ヘッダーを作ることができましたが、カウントダウンがゼロになった後は停止させることができませんでした。誰かがここにどうやってそれを起こさせるべきか考えていますか? 。カウントダウン後に固定ヘッダーを停止する
私がこれまで持っているスクリプト:
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