Evet arkadaşlar basit bir anlatım yapacağım
Kodlar aşağıda ve style şekilde yazıldı yani direk siteye koydğnz taktirde çalışacaktır. wp için index tercih edilebilir.
ama size önerim bunu direk koymamanız çnkü w3 kurallarına göre css'de hata verir. Kodun css'sini alıp style.css 'e ekleyin ve html kodunuda gerekli yere. Bu kadar.
+ Tarayıcının en altında çıkar ve facebook sohbet kutusu gibi sen gittikçe o da gider peşini bırakmaz
Kod:
<style type="text/css">
#semiyunbar{
position: fixed;
left: 0;
width: 100%;
text-indent: 5px;
padding: 5px 0;
background-color: red;
border-bottom: 1px solid black;
font: bold 12px Verdana;
}
* html #semiyunbar{ /*IE6 hack*/
position: absolute;
width: expression(document.compatMode=="CSS1Compat"? document.documentElement.clientWidth+"px" : body.clientWidth+"px");
}
</style> <script type="text/javascript">
function semiyunbar(){
this.displayfreq="always"
this.content='<a href="javascript:semiyunbar.close()"><img src="http://www.semiyun.com/images/close.gif" style="width: 16px; height: 16px; float: right; border: 0; margin-right: 25px" /></a>'
}
semiyunbar.prototype.setContent=function(data){
this.content=this.content+data
document.write('<div id="semiyunbar" style="bottom: -500px">'+this.content+'</div>')
}
semiyunbar.prototype.animatetoview=function(){
var barinstance=this
if (parseInt(this.barref.style.bottom)<0){
this.barref.style.bottom=parseInt(this.barref.style.bottom)+5+"px"
setTimeout(function(){barinstance.animatetoview()}, 50)
}
else{
if (document.all && !window.XMLHttpRequest)
this.barref.style.setExpression("bottom", 'document.compatMode=="CSS1Compat"? document.documentElement.scrollbottom+"px" : body.scrollbottom+"px"')
else
this.barref.style.bottom=0
}
}
semiyunbar.close=function(){
document.getElementById("semiyunbar").style.display="none"
if (this.displayfreq=="session")
document.cookie="infobarshown=1;path=/"
}
semiyunbar.prototype.setfrequency=function(type){
this.displayfreq=type
}
semiyunbar.prototype.initialize=function(){
if (this.displayfreq=="session" && document.cookie.indexOf("infobarshown")==-1 || this.displayfreq=="always"){
this.barref=document.getElementById("semiyunbar")
this.barheight=parseInt(this.barref.offsetHeight)
this.barref.style.bottom=this.barheight*(-1)+"px"
this.animatetoview()
}
}
window.onunload=function(){
this.barref=null
}
</script> <script type="text/javascript">
<!--Invocation code-->
var infobar=new semiyunbar()
infobar.setContent('<div align="center">mua-nın fuub.net için infobarı</div>')
//infobar.setfrequency('session') //
infobar.initialize()
</script>




0 yorum: