手机版html页面左右滑动切换页面,移动端手指左右滑动切换内容demo

说在开头

最近移动端做了一个手指左右滑动切换内容的效果demo;

为了表示我的无私,决定分享给诸位;(详细代码见附件)

正文

先上html代码html>

穿衣助理

完成

整个页面ul部分是需要切换的部分具体内容有js拼接而成

css代码如下:(这里直接贴上了less编译之后)body,div,ul{margin: 0px;padding: 0px;}

.m-shape{box-sizing: border-box;}

.m-shape .cont{  overflow: hidden;box-sizing: border-box;

}

.j-cont{  margin: 0 auto;

width: 100%;}

.m-shape .cont ul {

width: 1000%;

position: relative;

margin: 0 7%;

overflow: hidden;

}

.m-shape .cont ul li {

display: inline-block;

float: left;

width: 8%;

padding: 0 0.3%;

overflow: hidden;

box-sizing: content-box;

}

.m-shape .cont ul li .tishi {

position: absolute;

border-radius: 50%;

background: url(../p_w_picpaths/Assist_icon.png) no-repeat;

background-size: 30px 30px;

width: 30px;

height: 30px;

right: 10px;

top: 10px;

}

.m-shape .cont ul li .title {

height: 40px;

line-height: 40px;

text-align: center;

}

.m-shape .cont ul li .cont {

height: 77%;

text-align: center;

}

.m-shape .cont ul li .cont .img {

height: 100%;

text-align: ce

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值