您现在的位置: 雨哲在线 >> 文章教程 >> Web开发 >> 制作技巧 >> 查看文章内容

在网页右下角添加书签代码

【字体: 】       ★★★ 作者:艺雅中国    文章来源:动易论坛    点击数:1731    更新时间:2007-03-26    阅读点数:0

载入中

在挺多的国外网站在看到过,国内的大头BLOG也看到过,效果看上去都挺好,所以反代码整理出来提供给大家使用,我站以使用。大家可以看首页。

演示:


第 1 幅 ( 点击查看原图 )
在网页右下角添加书签代码



网站效果演示:http://www.yiyacn.com


效果功能特点是:
1. PNG透明图片,支持Firefox、IE6、IE7。
2. 收藏夹功能,支持Firefox、IE6、IE7。
3. 跟随页面滚动,位置不变。

1. 制作一张你自己喜欢的PNG图片,保存到images文件夹下,文件名为TooCoo.png,例如:


第 2 幅 ( 点击查看原图 )
在网页右下角添加书签代码
(保存该图,然后用软件打开,把字改一下就OK!)

2. 打开你需要添加标签的文件/如果你是模板,可以加在对应模板里。

3. 找到</head>标签,在其上面加入以下代码(其中收藏夹功能的网址和名称可自己修改):

 程序代码
<script language="javascript">
 <!--
 function addFavorite()
 {
 <%
 if inStr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") then
 %>
 window.external.AddFavorite('http://www.yiyacn.com/', 'YiYaCn.com 艺雅中国');
 <%
 elseif inStr(Request.ServerVariables("HTTP_USER_AGENT"),"Firefox") then
 %>
 window.sidebar.addPanel('艺雅中国', 'http://www.yiyacn.com/', "'YiYaCn.com 大头与饼仔");
 <%
 end if
 %>
 }
 -->
</script>
<style type="text/css">
<!--
a#TooCoo
{
    position:fixed!important;
    position:absolute;
    right: 0;
    bottom: 0;
    Top: expression(offsetParent.scrollTop + offsetParent.clientHeight - 96);
    display: block;
    height: 96px;
    width: 96px;
    background: url(images/TooCoo.png) bottom right no-repeat !important;
    text-indent: -999em;
    text-decoration: none;
    z-index:99;
    background-image: url();
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/TooCoo.png');
}
-->
</style>


4. 找到<body>标签,在其下面加入以下代码:

 程序代码
<A href="javascript:addFavorite()" id="TooCoo">www.yiyacn.com</a>

 

原贴:http://bbs.powereasy.net/dispbbs.asp?boardid=28&id=308580

文章来源:Yz81@Com

网友看法
    数据载入中,请稍后……
    发表评论
    昵 称: 邮 箱:
    评 分:
    内 容:
    0/5000)
    插入链接
    验证码:

    雨哲提示:Alt+S快速发表
用户信息中心
与本文章相关内容
广告位招商QQ:425162221