Web前端-JS效果-图片自动获取焦点与切换

一个自动获取图片焦点,并定时切换的代码:
此图镇楼:
这里写图片描述

1.html代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JS焦点幻灯代码 </title>

<script type="text/javascript" src="js/js1.js"></script>
<link rel="stylesheet" href="css/base.css" />

<style type="text/css">
#ifocus { width:500px; height:266px;margin:0 auto;border:1px solid #DEDEDE; background:#F8F8F8; }
#ifocus_pic { display:inline; position:relative; float:left; width:400px; height:266px; overflow:hidden;  }
    #ifocus_piclist { position:absolute; }
    #ifocus_piclist li { width:400px; height:266px; overflow:hidden; }
    #ifocus_piclist img { width:400px; height:266px; margin: 0 auto;}

#ifocus_btn { display:inline; float:left; width:99px;margin-right:1px ;}
    #ifocus_btn li { width:98px; height:53px; cursor:pointer; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); }
    #ifocus_btn img { width:98px
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

艺术2333

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值