Добро пожаловать, Гость!
До нового года осталось - Полезный php код №11
Все категории
До нового года осталось
Описание: JS до нового года осталось
Код:
<sсript language='javasсript'>fulltime();</sсript><left><div class="jack-sparrow"><div class="jack"><div class="jack-reply"><b><span id="random_subtit"></span><sсript language='javasсript' type='text/javasсript'>
function fulltime () {
var time=new Date();
var newYear=new Date("jan,01,2014,00:00:00");
var totalRemains=(newYear.getTime()-time.getTime());
if (totalRemains>1){
var RemainsSec = (parseInt(totalRemains/1000));
var RemainsFullDays=(parseInt(RemainsSec/(24*60*60)));
var secInLastDay=RemainsSec-RemainsFullDays*24*3600;
var RemainsFullHours=(parseInt(secInLastDay/3600));
if (RemainsFullHours<10){RemainsFullHours="0"+RemainsFullHours};
var secInLastHour=secInLastDay-RemainsFullHours*3600;
var RemainsMinutes=(parseInt(secInLastHour/60));
if (RemainsMinutes<10){RemainsMinutes="0"+RemainsMinutes};
var lastSec=secInLastHour-RemainsMinutes*60;
if (lastSec<10){lastSec="0"+lastSec};
document.getElementById("RemainsFullDays").innerHTML=RemainsFullDays+"<span id='Rem'> дн</span>";
document.getElementById("RemainsFullHours").innerHTML=RemainsFullHours+"<span id='Rem'> час</span>";
document.getElementById("RemainsMinutes").innerHTML=RemainsMinutes+"<span id='Rem'> мин</span>";
document.getElementById("lastSec").innerHTML=lastSec+"<span id='Rem'> сек</span>";
setTimeout('fulltime()',10)
}
else{
document.getElementById("clock").innerHTML="C НОВЫМ ГОДОМ !!!";
}
}
</sсript>
<style type='text/css'>
#clou_xs {position:relative;width:90px;font-size:16px;height:125px;padding:5px;color:#3d85c6 }
</style>
<div id='clou_xs'>
<div id='clock'>
До Нового года осталось:
<span id='RemainsFullDays'></span>
<span id='RemainsFullHours'></span>
<span id='RemainsMinutes'></span>
<span id='lastSec'></span>
</div>
</div>
<sсript language='javasсript'>fulltime();</sсript></b></div></div></div><style>
.jack-sparrow {
position:relative;
background: url('http://s002.radikal.ru/i197/1211/34/680e87ced12e.jpg') no-repeat;
margin:0px;
padding:0px;
height: 164px;
width: 298px;
}
.jack {
display:block;
position:absolute;
top: 10px;
left: 15px;
background:transparent;
height:150px;
width: 120px;
}
.jack-reply, .jack-reply:before, .jack-reply:after{
position:absolute;
left: -999em;
}
.jack-reply {
display:block;
z-index:3;
top: 22px; left: 120px;
background: #f0f5fa;
border: 3px solid #9fc5e8;
-webkid-border-radius: 10px 10px 10px 10px;
-moz-border-radius: 10px 10px 10px 10px;
border-radius: 10px;
-moz-box-shadow: 0.7em 0.7em 1em -0.5em rgba(0,0,6,0.5);
-webkid-box-shadow: 0.7em 0.7em 1em -0.5em rgba(0,0,6,0.5);
box-shadow: 0.7em 0.7em 1em -0.5em rgba(0,0,6,0.5);
font: normal normal 100% Comic Sans MS;
color: #000;
padding: 7px;
margin: 0;
width: 80%;
}
.jack-reply:before {
content: ' ';
position: absolute; z-index:3;
width: 0;
height: 0;
left: -30px;
top: 27px;
border: 17px solid;
border-color: #9fc5e8 #9fc5e8 transparent transparent;
}
.jack-reply:after {
content: ' ';
position: absolute; z-index:3;
width: 0;
height: 0;
left: -23px;
top: 30px;
border: 15px solid;
border-color: #f0f5fa #f0f5fa transparent transparent;
}</style></left><br/>
<sсript language='javasсript'>fulltime();</sсript><left><div class="jack-sparrow"><div class="jack"><div class="jack-reply"><b><span id="random_subtit"></span><sсript language='javasсript' type='text/javasсript'>
function fulltime () {
var time=new Date();
var newYear=new Date("jan,01,2014,00:00:00");
var totalRemains=(newYear.getTime()-time.getTime());
if (totalRemains>1){
var RemainsSec = (parseInt(totalRemains/1000));
var RemainsFullDays=(parseInt(RemainsSec/(24*60*60)));
var secInLastDay=RemainsSec-RemainsFullDays*24*3600;
var RemainsFullHours=(parseInt(secInLastDay/3600));
if (RemainsFullHours<10){RemainsFullHours="0"+RemainsFullHours};
var secInLastHour=secInLastDay-RemainsFullHours*3600;
var RemainsMinutes=(parseInt(secInLastHour/60));
if (RemainsMinutes<10){RemainsMinutes="0"+RemainsMinutes};
var lastSec=secInLastHour-RemainsMinutes*60;
if (lastSec<10){lastSec="0"+lastSec};
document.getElementById("RemainsFullDays").innerHTML=RemainsFullDays+"<span id='Rem'> дн</span>";
document.getElementById("RemainsFullHours").innerHTML=RemainsFullHours+"<span id='Rem'> час</span>";
document.getElementById("RemainsMinutes").innerHTML=RemainsMinutes+"<span id='Rem'> мин</span>";
document.getElementById("lastSec").innerHTML=lastSec+"<span id='Rem'> сек</span>";
setTimeout('fulltime()',10)
}
else{
document.getElementById("clock").innerHTML="C НОВЫМ ГОДОМ !!!";
}
}
</sсript>
<style type='text/css'>
#clou_xs {position:relative;width:90px;font-size:16px;height:125px;padding:5px;color:#3d85c6 }
</style>
<div id='clou_xs'>
<div id='clock'>
До Нового года осталось:
<span id='RemainsFullDays'></span>
<span id='RemainsFullHours'></span>
<span id='RemainsMinutes'></span>
<span id='lastSec'></span>
</div>
</div>
<sсript language='javasсript'>fulltime();</sсript></b></div></div></div><style>
.jack-sparrow {
position:relative;
background: url('http://s002.radikal.ru/i197/1211/34/680e87ced12e.jpg') no-repeat;
margin:0px;
padding:0px;
height: 164px;
width: 298px;
}
.jack {
display:block;
position:absolute;
top: 10px;
left: 15px;
background:transparent;
height:150px;
width: 120px;
}
.jack-reply, .jack-reply:before, .jack-reply:after{
position:absolute;
left: -999em;
}
.jack-reply {
display:block;
z-index:3;
top: 22px; left: 120px;
background: #f0f5fa;
border: 3px solid #9fc5e8;
-webkid-border-radius: 10px 10px 10px 10px;
-moz-border-radius: 10px 10px 10px 10px;
border-radius: 10px;
-moz-box-shadow: 0.7em 0.7em 1em -0.5em rgba(0,0,6,0.5);
-webkid-box-shadow: 0.7em 0.7em 1em -0.5em rgba(0,0,6,0.5);
box-shadow: 0.7em 0.7em 1em -0.5em rgba(0,0,6,0.5);
font: normal normal 100% Comic Sans MS;
color: #000;
padding: 7px;
margin: 0;
width: 80%;
}
.jack-reply:before {
content: ' ';
position: absolute; z-index:3;
width: 0;
height: 0;
left: -30px;
top: 27px;
border: 17px solid;
border-color: #9fc5e8 #9fc5e8 transparent transparent;
}
.jack-reply:after {
content: ' ';
position: absolute; z-index:3;
width: 0;
height: 0;
left: -23px;
top: 30px;
border: 15px solid;
border-color: #f0f5fa #f0f5fa transparent transparent;
}</style></left><br/>
Добавил: HaUser (30 Мая 2014)
Просмотров: (67)
Комментарии (0)
Скачать: TEXTAREA
DCMS-Social.ru - движок социальной сети, вап и веб мастерская, файло-обменник и форум.
Статистика DCMS-Social.ru: Пользователей - 14971, тем на форуме - 30292, сообщений - 298888