手风琴demo
来源:互联网 发布:linux qq安装教程 编辑:程序博客网 时间:2024/06/06 17:47
进去把图片换一下
<!DOCTYPE html><!--DTD文档声明类型 HTML5 --><html><head lang="en"> <meta charset="UTF-8"> <title>手风琴demo</title> <style> *{margin:0;padding:0;} html,body{height:100%;} li{ list-style: none;} body{ position:relative; /*参考物*/ } .bg-box{ /*绝对定位 谁动谁儿子 父相子绝*/ position: absolute; top:0; left:0; width:100%; height:100%; background:#368 ; } .bg-box img{/*inline-block*/ display: block;/*转换成会计元素,清楚默认的对其方式*/ width:100%; height:100%; } #wrap{ position: absolute; /*top:50%;*/ /*left:50%;*/ /*margin-left:-350px;*/ /*margin-top:-150px;*/ top:0; left:0; right:0; bottom:0; margin:auto; width:700px; height:300px; border:3px solid #000; } #wrap ul{ width:120%; } #wrap ul li{ width:100px; height:300px; background:url("img/big-img-1.jpg"); float:left; } #wrap ul li div{ width:100px; height:300px; background:rgba(0,0,0,0.5); } #wrap ul li div p{ padding:10px 40px; color:#fff; text-align: center; } #wrap ul li:nth-child(2){ background: url("img/big-img-2.jpg"); } #wrap ul li:nth-child(3){ background: url("img/big-img-3.jpg"); } #wrap ul li:nth-child(4){ width:400px; background: url("img/big-img-4.jpg"); background-size:cover; } </style></head><body><!--页面呈现--><div> <div class="bg-box"> <img src="img/big-img-1.jpg" width="994" height="626" alt="test"/> </div> <div class="bg-box"> <img src="img/big-img-2.jpg" width="994" height="626" alt="test"/> </div> <div class="bg-box"> <img src="img/big-img-3.jpg" width="994" height="626" alt="test"/> </div> <div class="bg-box"> <img src="img/big-img-4.jpg" width="994" height="626" alt="test"/> </div></div> <div id="wrap"> <ul> <li> <div> <p>我的个人拉萨之旅  |   |  哈哈哈</p> </div> </li> <li> <div> <p>我的个人拉萨之旅  |   |  哈哈哈</p> </div> </li> <li> <div> <p>我的个人拉萨之旅  |   |  哈哈哈</p> </div> </li> <li> <div> <p>我的个人拉萨之旅  |   |  哈哈哈</p> </div> </li> </ul> </div></body><script src="js/jquery-1.7.1.min.js"></script><script> var $li = $('#wrap ul li'); var $bg = $('.bg-box'); //li hover时候出发事件 $li.hover(function(){ var index = $(this).index(); $bg.eq(index).fadeIn(300).siblings().fadeOut(300); $(this).stop().animate({ width:'400px', 'background-size':'cover' }).siblings('li').stop().animate({ width:'100px' }) })</script>
阅读全文
0 0
- 手风琴demo
- 手风琴下拉菜单demo
- 手风琴
- 手风琴
- 手风琴
- jquery实现侧边栏手风琴三级导航菜单demo
- jQuery-手风琴
- 手风琴特效
- 手风琴效果
- 手风琴菜单
- 手风琴效果
- 手风琴效果
- 手风琴效果
- 手风琴控件
- 手风琴效果
- 手风琴特效
- jquery----手风琴
- css手风琴
- 卷积神经网络CNN
- 输出现在的时间
- Java 输出整数的二进制讲解
- javascript 面向对象
- 自动驾驶 (资料)
- 手风琴demo
- 获取从HyperLinkField传递的参数
- ceph源码学习之c++语法
- 2. git提交代码与查看提交log
- nginx安装及配置
- 《算法导论》学习笔记
- 安装GCC4.8和G++4.8并降级
- 运算符的优先级和导包后的基本数据类型的格式
- [BZOJ3637]Query on a tree VI(树链剖分)