首  页  |  酷站  |  精品网站  |  原创作品秀  |  网络学院   |  信息中心  |  艺术设计  |  求职招聘  |  建站资源  |  服装网站  |  论坛  |  设计部落  |  网站综合
个人网页  商业网站  业界动态  设计赛事  网站资源  下载专区  设计欣赏  CG-插画  JS特效  娱乐  国际品牌  知名品牌  服装院校  专题欣赏  SEO  BANNER
域名注册 虚拟主机 广州网站建设 广州网页设计 IDC赞助 设计资源下载 虚拟主机 域名注册 品牌网站建设 服装品牌网站建设 广告服务 网站推广 娱乐
当前位置:首 页 >> JS特效 >> 页面特效类 >> 可选择背景色的广告牌效果

可选择背景色的广告牌效果


中资源
转载请注明出处-中国设计秀-cnwebshow.com

脚本源代码:
<body>
<style>
body {background-color:#999999}
#all {width:100px; height:200px; background-color:#FFFFFF; overflow:hidden; }
#left {width:100px; background-color:#F90FF1; float:left; height:200px}
#left li {cursor:hand; font:bold 12px "Arial Black";  list-style:circle; margin-left:-10px; color:#FFFFFF}
#right {width:100px; background-color:#FFFF00; float:left; height:200px; cursor:hand;font:bold 15px "Arial Black"; color: #333333}
</style>
<script language="javascript">
function  $(id) {return document.getElementById(id)}
function left(id) {
var alla=  $("alla");
var right=  $("right");
var alla_left=parseInt(alla.style.marginLeft);
   if (alla_left==0) {
      if (id==1) {right.innerHTML="#5AE9FA";;right.style.backgroundColor="#5AE9FA"}
      else if (id==2) {right.innerHTML="#ADFA5A";right.style.backgroundColor="#ADFA5A"}
      else if (id==3) {right.innerHTML="#F9A40F";;right.style.backgroundColor="#F9A40F"}
      left_decrease()
   }
   if (alla_left==-100) {right_decrease()}
}
function left_decrease() {
var alla=  $("alla");
var alla_left=parseInt(alla.style.marginLeft);
if (alla_left==-100) {clearTimeout(time)}
else {
alla.style.marginLeft=alla_left-1;
time= setTimeout("left_decrease()",1)
}
}
function right_decrease() {
var alla= document.getElementById("alla");
var alla_left=parseInt(alla.style.marginLeft);
if (alla_left==0) {clearTimeout(time)}
else {
alla.style.marginLeft=alla_left+1;
time= setTimeout("right_decrease()",1)}
}
</script>
<div id="all">
  <div id="alla" style="margin-left:0px;  width:200px">
     <div id="left">
     <ul>
     <li onclick="left(1)" style="color:#5AE9FA">color1</li>
     <li onclick="left(2)" style="color:#ADFA5A">color2</li>
     <li onclick="left(3)" style="color:#F9A40F">color3</li>
  </ul>
  </div>
     <div id="right"  onclick="left()"></div>
  </div>
</div>
</body>
转载请注明出处-中国设计秀-cnwebshow.com



投稿 】【对本文进行评论】 【字体: 】【发布于2007-08-21 14:29】

相关专题:暂无相关专题

上一篇:JavaScript实现页面淡出效果   下一篇:可伸展收缩的内容显示栏目
 认证LOGO下载
     
Copyright © 2005-2007 中国设计秀_网页设计教程_优秀网页设计欣赏_平面设计欣赏 All Right Reserved.
做最专业的设计服务网站,秀出自我,秀出精彩!中国设计秀,秀---无处不在!!
QQ:54292427  8208442 MSN:kingvisual#hotmail.com 交流群:9107036 3848215 8850631
粤ICP备05067046号 RSS