以下的代码只要贴在小工具的HTML/Java Script就能用了^_^
<style>
#postit{
position:fixed; width:240px; padding:12px; background: url(图片链接) repeat;height:600px; border: 4px inset #EAE9F7 ; -moz-border-radius: 30px 30px;
border-radius: 50px 30px;visibility:hidden; z-index:100; cursor:hand; color: white }
-->
</style>
<div id=postit style="right: 35px; top: 20px">
<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>
NOTES :
padding:12px
width:240px = 整个留言板的宽度
height:600px = 框框的高度
repeat
如果你的图片是小小的要重复的话就REPEAT,那才能整个框框有背景
如果你的图片是不能重复的那种,就自己把图片弄好尺寸才放下去吧
图片的尺寸是根据:
width:240px ( 这个必须加大一些,EX: 240px 我加多2opx 就是260px )
height:600px
border: 4px = BORDER 的厚度
inset = BORDER的种类
#EAE9F7 = BORDER的颜色
right: 35px = 边框与部落格右边的距离
top: 40px = 框框的顶部与部落格的顶部距离
border-radius: 50px 30px
没有评论:
发表评论