教学。如何制作欢迎板
19 November 2011 @ 11:16 AM


如果你成功了,
请关注我和留言噢 (:

-

[ 转帖--留言'附上链接和主人名字 ]

-

这篇教大家怎样弄欢迎板 :)


1 Design > Edit layout > add a gadget > HTML/java script
2 把以下的代码放进去 :


<style>
<!--
#postit{
position:fixed; width:225px; padding:5px; background: #FFD9EC; border:2px solid #000000;   -moz-border-radius: 15px 15px;
border-radius: 15px 15px;

visibility:hidden; z-index:100; cursor:crosshair; color: black }
-->
</style>
<div id=postit style="left: 0px; top: 150px">
<div align=right><b><a href="javascript:closeit()">[Close]</a></b></div><br />
<!--INSERT YOUR CONTENT HERE--><br />

你要显示的内容 

<!--END YOUR CONTENT HERE--><br />
<br />
</div><br />
<script type="text/javascript" language="javascript">

//Post-it only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause postit to display every time page is loaded

var once_per_browser=0

///No need to edit beyond here///

var ns4=document.layers

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ns4)
crossobj=document.layers.postit
else if (ie4||ns6)
crossobj=ns6? document.getElementById("postit") : document.all.postit


function closeit(){
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
crossobj.visibility="hide"
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function showornot(){
if (get_cookie('postdisplay')==''){
showit()
document.cookie="postdisplay=yes"
}
}

function showit(){
if (ie4||ns6)
crossobj.style.visibility="visible"
else if (ns4)
crossobj.visibility="show"
}

if (once_per_browser)
showornot()
else
showit()

</script>

红色 是欢迎板的宽度
橙色 是欢迎板的背景
黄色 是框框的粗细度'款式和颜色
青色 是欢迎板的圆角度'两个都必须一样
蓝色 是欢迎板的位置'左或右
紫色 是欢迎板的位置'上或下
粉红色 是欢迎板的内容

3 然后按 save 就好啦 ^^

[ 完 peace out ]