html实现抽屉式效果,抽屉式效果.html

Document

* {

margin: 0px;

padding: 0px;

}

body {

background: url('img/bg.jpg')

}

.box {

width: 1100px;

height: 430px;

margin: 120px auto;

}

.box ul li {

list-style-type: none;

width: 100px;

height: 429px;

float: left;

}

.box .l1 {

background: url('./img/1.png')

}

.box .l2 {

background: url('./img/2.png')

}

.box .l3 {

background: url('./img/3.jpg')

}

.box .l4 {

background: url('./img/4.jpg');

width: 789px;

}

.box .txt {

width: 100px;

height: 429px;

background: rgba(4, 2, 6, 0.4);

cursor: pointer;

}

.box .txt p {

color: #fff;

font-family: "微软雅黑";

float: left;

}

.box .txt p.p1 {

font-size: 12px;

width: 12px;

margin: 45px 20px 0 20px;

}

.box .txt p.p2 {

font-size: 14px;

width: 14px;

margin-top: 120px;

}

  • 作者 :小猪

    拉萨之旅

  • 作者 :小猪

    荒漠之旅

  • 作者 :小猪

    山谷之旅

  • 作者 :小猪

    冰山之旅

$(".box ul li").click(function () {

$(this).stop(true).animate({

width: "789px"

}, 1000).siblings().stop(true).animate({

width: "100px"

}, 1000);

});

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值