Уроки
3
Реклама вверху сайта ucoz
Code
<style type="text/css">
#informationbar{
position: fixed;
left: 0;
width: 100%;
text-indent: 5px;
padding: 5px 0; /*толщина инфор бара*/
background-color: yellow; /*цвет фона*/
border-bottom: 1px solid black; /*толщина и цвет рамки*/
font: bold 15px Verdana;/*Размер шрифта, и стиль*/
}
* html #informationbar{ /*IE6 hack*/
position: absolute;
width: expression(document.compatMode=="CSS1Compat"? document.documentElement.clientWidth+"px" : body.clientWidth+"px");
}
</style>
<script type="text/javascript">
function informationbar(){
this.displayfreq="always"
this.content='<a href="javascript:informationbar.close()"><img src="http://icons.iconarchive.com/icons/mazenl77/I-like-buttons-3a/48/Cute-Ball-Stop-icon.png" style="width: 14px; height: 14px; float: right; border: 0; margin-right: 5px" /></a>'
}
informationbar.prototype.setContent=function(data){
this.content=this.content+data
document.write('<div id="informationbar" style="top: -500px">'+this.content+'</div>')
}
informationbar.prototype.animatetoview=function(){
var barinstance=this
if (parseInt(this.barref.style.top)<0){
this.barref.style.top=parseInt(this.barref.style.top)+5+"px"
setTimeout(function(){barinstance.animatetoview()}, 50)
}
else{
if (document.all && !window.XMLHttpRequest)
this.barref.style.setExpression("top", 'document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px" : body.scrollTop+"px"')
else
this.barref.style.top=0
}
}
informationbar.close=function(){
document.getElementById("informationbar").style.display="none"
if (this.displayfreq=="session")
document.cookie="infobarshown=1;path=/"
}
informationbar.prototype.setfrequency=function(type){
this.displayfreq=type
}
informationbar.prototype.initialize=function(){
if (this.displayfreq=="session" && document.cookie.indexOf("infobarshown")==-1 || this.displayfreq=="always"){
this.barref=document.getElementById("informationbar")
this.barheight=parseInt(this.barref.offsetHeight)
this.barref.style.top=this.barheight*(-1)+"px"
this.animatetoview()
}
}
window.onunload=function(){
this.barref=null
}
</script>
<script type="text/javascript">
<!--Invocation code-->
var infobar=new informationbar()
infobar.setContent('Добро пожаловать на тестовый сайт on-lainfiles <a href="http://on-lainfiles.my1.ru">On-lainfiles</a>')
//Информационный бар.setfrequency('session') //Информационный бар будет показываться толька за одну сесию браузера!
infobar.initialize()
</script>
#informationbar{
position: fixed;
left: 0;
width: 100%;
text-indent: 5px;
padding: 5px 0; /*толщина инфор бара*/
background-color: yellow; /*цвет фона*/
border-bottom: 1px solid black; /*толщина и цвет рамки*/
font: bold 15px Verdana;/*Размер шрифта, и стиль*/
}
* html #informationbar{ /*IE6 hack*/
position: absolute;
width: expression(document.compatMode=="CSS1Compat"? document.documentElement.clientWidth+"px" : body.clientWidth+"px");
}
</style>
<script type="text/javascript">
function informationbar(){
this.displayfreq="always"
this.content='<a href="javascript:informationbar.close()"><img src="http://icons.iconarchive.com/icons/mazenl77/I-like-buttons-3a/48/Cute-Ball-Stop-icon.png" style="width: 14px; height: 14px; float: right; border: 0; margin-right: 5px" /></a>'
}
informationbar.prototype.setContent=function(data){
this.content=this.content+data
document.write('<div id="informationbar" style="top: -500px">'+this.content+'</div>')
}
informationbar.prototype.animatetoview=function(){
var barinstance=this
if (parseInt(this.barref.style.top)<0){
this.barref.style.top=parseInt(this.barref.style.top)+5+"px"
setTimeout(function(){barinstance.animatetoview()}, 50)
}
else{
if (document.all && !window.XMLHttpRequest)
this.barref.style.setExpression("top", 'document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px" : body.scrollTop+"px"')
else
this.barref.style.top=0
}
}
informationbar.close=function(){
document.getElementById("informationbar").style.display="none"
if (this.displayfreq=="session")
document.cookie="infobarshown=1;path=/"
}
informationbar.prototype.setfrequency=function(type){
this.displayfreq=type
}
informationbar.prototype.initialize=function(){
if (this.displayfreq=="session" && document.cookie.indexOf("infobarshown")==-1 || this.displayfreq=="always"){
this.barref=document.getElementById("informationbar")
this.barheight=parseInt(this.barref.offsetHeight)
this.barref.style.top=this.barheight*(-1)+"px"
this.animatetoview()
}
}
window.onunload=function(){
this.barref=null
}
</script>
<script type="text/javascript">
<!--Invocation code-->
var infobar=new informationbar()
infobar.setContent('Добро пожаловать на тестовый сайт on-lainfiles <a href="http://on-lainfiles.my1.ru">On-lainfiles</a>')
//Информационный бар.setfrequency('session') //Информационный бар будет показываться толька за одну сесию браузера!
infobar.initialize()
</script>
Теги материала :
Уважаемый посетитель, вы зашли на наш портал как незарегистрированный пользователь.
Мы рекомендуем вам зарегистрироваться либо войти на сайт под своим логином.
Мы рекомендуем вам зарегистрироваться либо войти на сайт под своим логином.
Автор: ГостьПросмотров: 2848
Всего комментариев: 3 | |
Написал: OnPulse #3 21.12.2013, 11:42
дибил сука!
Написал: ice3000 #2 15.08.2013, 16:38
Реально а где блядь скрипт то????
Написал: BuTaJIuk #1 24.09.2012, 15:08
Где скрипт взять?
| |
Последние ответы с форума
Форум | Ответы |
Заказ РекламыДобавлено в раздел: Ваша реклама на нашем сайте | 3 |
Услуги и ЦеныДобавлено в раздел: Наши Цены | 4 |
Ваши предложения по созданию нового урокаДобавлено в раздел: Какой будет следующий урок | 1 |
Набор персоналаДобавлено в раздел: Набор персонала | 0 |
Мини-чат
Категории
Статистика
Поиск