使用HTML+css实现京东图片自动轮播效果(自己写的)

本文展示了如何使用HTML和CSS实现一个京东风格的图片自动轮播效果,结合jQuery实现鼠标悬停停止轮播,鼠标离开后继续轮播,以及手动切换图片的功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<!doctype html>
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>jQuery图片轮换效果</title>
  <style type="text/css">
  *{
	margin:0px;
	padding:0px;
	text-align:center;
  }

  #banner{
	width:730px;
	height:454px;
	margin:50px auto;
	position:relative;/*相对定位,相对于.btn按钮*/
	text-align:left;
  }
  .pic image {
	display:block;/*默认有图片不显示*/
	position:absolute;/*绝对定位.对应的是.pic这个div*/
	top:0px;
	left:0px;
  }
  .pic a{
	display:none;
  }
  .pic{        /*专门显现图片区*/
	position:relative;/*相对定位.对应.pic img*/
	border:1px solid red;
  }
  .btn{
	width:150px;
	height:18px;
	position:absolute;/*绝对定位相对于banner div*/
	bottom:5px;
	right:290px;
  }
  .btn ul li{
	background-color:#000000;/*黑色*/
	color:#ffffff;
	list-style-type:none;
	width:18px;
	height:18px;
	float:left;
	bord
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值