xl.gif

我的频道2

html{height: 100%;}

body{height: 100%;background: #F1F1F1;}

![](image/img/feic1-r1.png)

我的频道

![](image/img/feic1-z1.png)

  • ![](image/img/feic1-16.png)

    批发商城

  • ![](image/img/feic1-35.png)

    生日礼物

  • ![](image/img/feic1-34.png)

    十元包邮

  • ![](image/img/feic1-21.png)

    礼品资讯

![](image/img/feic1-r1.png)

主频道

![](image/img/feic1-z1.png)

  • ![](image/img/feic1-5.png)

    供应

  • ![](image/img/feic1-6.png)

    求购

  • ![](image/img/feic1-22.png)

    招商加盟

  • ![](image/img/feic1-8.png)

    展会资讯

  • ![](image/img/feic1-33.png)

    团购

  • ![](image/img/feic1-4.png)

    商家

  • ![](image/img/feic1-13.png)

    品牌

  • ![](image/img/feic1-31.png)

    送给谁

  • ![](image/img/feic1-30.png)

    最新上市

  • ![](image/img/feic1-32.png)

    排行榜

取消

确定

$(function(){

function fbottom(naan,x,time){ naan.animate({ bottom:x+"rem" }, time, 'ease-out') };

var myChannel = $(".my-channel-ul li div");//我的频道

var otherChannel = $(".other-channel-ul li div");//主频道

var allChannel = $(".channel-ul li div");//全部频道

var ms = "

请在下方选择一个主频道";

var skipFlag = false;

var addFlag = false;

var delFlag = false;

allChannel.on("longTap",function(event){//长按事件 所有上下的ul li 触发事件

$(".channel-ul .del").addClass("del-show"); // 出现小圆箭头 删除标志 显示

$(".channel-ul .clickDom").addClass("editD"); //给所有li 添加一个标识editd

$(".channel-ul li").removeClass("leng"); //给所有li 移除 leng 标识

$(".clickDom").show(); //在结尾的时候 添加遮罩层 禁止跳转

fbottom($(".feic1-bootm"),0,400); //顶部导航栏 出现

});

$(".my-channel-ul").on("touchstart touchmove touchend",".del-show", function(){//从我的频道删除

switch(event.type) {

case 'touchstart':delFlag = false;break;

case 'touchmove':delFlag = true;break;

case 'touchend':if( !delFlag ) {

$(this).removeClass("del-show"); //移除小箭头

$(this).parents("ul").children("li:last-child").after(ms)//添加提示按钮

var c_html ="

"+$(this).parent('div').clone(true).prop('outerHTML')+""; // 获取当前点击元素的HTML

$(this).parents("li").remove(); //移除当前点击的html

$(".other-channel-ul").append(c_html); //把当前的HTML 复制到下方去

}

break;

}

});

$(".other-channel-ul").on("touchstart touchmove touchend",".editD", function(){//从主频道往我的频道添加

switch(event.type) {

case 'touchstart':addFlag = false;break;

case 'touchmove':addFlag = true;break;

case 'touchend':if( !addFlag ) {

if($(".f-right").length > 0){

var d_html = $(this).parents('li').clone(true); // 获取每一个元素的 HTML

$(".my-channel-ul").prepend(d_html); // 在上面四个元素的前面添加 html

$(".my-channel-ul").find("li:last-child").remove(); //在上面四个元素在最后的一名元素 删除

$(this).parents("li").remove();// 删除下面十四个元素的当前对象

}else{

myLayer("已经满位啦!")//弹窗 当前对象

}

}

break;

}

})

$(".channel-ul").on("touchstart touchmove touchend","li.leng", function(event){//点击直接跳转

switch(event.type) {

case 'touchstart':skipFlag = false;break;

case 'touchmove':skipFlag = true;break;

case 'touchend':if( !skipFlag ) {

var theLink = $(this).attr("skip")

location.href = theLink

console.log('点击');

}

break;

}

})

$(".feic1-bootm").on("touchend",".sub-btn", function(){//提交

if($(".my-channel-ul .f-right").length >0){

myLayer("请选择4个你喜欢的频道")

}else{

refresh();

}

});

$(".feic1-bootm").on("touchend",".cancel-btn", function(){//取消

refresh();

});

function refresh(){//刷新

window.location.reload();

}

function myLayer(msg){

layer.open({

content: msg,

skin: 'msg',

style: 'border:none;padding:0.2rem 0.5rem;font-size:0.3rem;color:#fff;top:50%;',

time: 2 //2秒后自动关闭

});

}

})

/*频道选择*/

.gary-bg-divv{width: 100%;background: #F1F1F1;padding-top: 0.4rem;font-size: 0.373333rem;color: #222;}

.channel-title{width: 9.066667rem; margin: 0 auto;text-align: center;height: 1.133333rem;line-height: 1.133333rem;background: #fff;margin-bottom: 0.266667rem;}

.channel-title img{width: 0.333333rem;height: 0.333333rem;}

.channer-ul-box{width: 9.066667rem;margin: 0 auto;overflow: hidden;}

.channel-ul{width: 9.333333rem;margin: 0 auto;overflow: hidden;margin-left: -0.266667rem;margin-bottom: 0.3rem;}

.channel-ul li{ position: relative; width: 2.066667rem;height: 2.066667rem;float: left;margin-left: 0.266667rem;margin-bottom: 0.266667rem;text-align: center; font-size: 0.293333rem;color: #555;line-height: 3rem;-webkit-user-select: none;-moz-user-select: none;background:#fff url(../image/img/feic1-add.png) no-repeat center 0.16rem; background-size: 40%;}

.channel-ul li>div{}

.channel-ul li span{position: absolute;width: 2.066667rem;height: 2.066667rem;background: #eee; z-index: 11;color: #000;background: none;top: 0;left: 0;}

.channel-ul li img{position: absolute;width: 2.066667rem;height: 2.066667rem; z-index: 9;top: 0;left: 0;}

.channel-ul li img.del{z-index: 10;width: 0.333333rem !important;height: 0.333333rem !important; left: 1.7rem !important;display: none;}

.channel-ul li span.del-show{display: block;!important; width: 2.066667rem;height: 2.066667rem;position: absolute;background: url(../image/img/feic1-del.png) no-repeat 1.55rem 0.133333rem; background-size: 19%;z-index: 20;}

.f-right i{line-height: 0.4rem !important;display: inline-block;margin-top: 1.1rem;width: 1.76rem;font-size: 0.266666rem;}

.channer-ul-box .other-channel-ul li span.del-show{display: none;!important;}

.channel-ul li a{display: block;width: 100%;height: 100%;position: absolute;z-index: 1;}

.clickDom{display: none;position: absolute;width: 2.066667rem;height: 2.066667rem;z-index: 9999999;}

/*确定取消按钮*/

.feic1-bootm{position: fixed;display: flex; flex-direction: row; bottom: -3rem; left: 0; width: 100%; height: 1.133333rem; background: #FFFFFF;z-index: 99999999999999999;}

.feic1-bootm span{flex: 1; display: flex; justify-content: center; align-items: center; color: #FFFFFF; font-size: 0.373333rem;}

.feic1-bootm span:nth-child(1){background:#f69123;}

.feic1-bootm span:nth-child(2){background:#ff7800;}

手机 长按删除 html5,移动端长按删除相关推荐

  1. html5实现ios长按图标后进入图标排序及删除功能的效果

    2019独角兽企业重金招聘Python工程师标准>>> html5实现ios长按图标后进入图标排序及删除功能的效果 我们知道在ios(国产定制安卓系统基本都有)设备上按下图标,图标就 ...

  2. 手机端 html5 按长按保存图片尺寸,html5移动端禁止长按图片保存的实现

    在移动端访问H5页面的时候,长按图片就会把图片保存起来,为了能够让用户体验更好一些,我们需要长按的时候也不保存图片.那该如何实现呢?下面给出3种解决方案. 方案一:使用 pointer-events: ...

  3. html5 自适应手机布局,科技常识:html5移动端自适应布局的实现

    今天小编跟大家讲解下有关html5移动端自适应布局的实现 ,相信小伙伴们对这个话题应该有所关注吧,小编也收集到了有关html5移动端自适应布局的实现 的相关资料,希望小伙伴们看了有所帮助. 场景:为适 ...

  4. android+截图长屏软件,手机摄影:一款真正好用的安卓端长截图APP,没有之一!...

    原标题:手机摄影:一款真正好用的安卓端长截图APP,没有之一! 上次分享了一篇安卓版长截图的应用--LONPIC.其实严格的说这是一个长拼图,当然也能做出长截图的效果.比如我们做一篇文章的长截图,需要 ...

  5. html制作手机预览效果,新移动端Html5方式预览报表插件

    2. Html5报表制作及手机效果 2.1 手机页面大小 制作手机上的报表与PC端报表制作过程是一样的,为了让用户制作出适合手机尺寸的报表,在模板>>移动端属性地方,勾选设置为手机模板画布 ...

  6. html5 pc端 客户端 web端的区别,wap版、手机版以及web的区别

    wap版.手机版以及web的区别 手机上的应用通常分为"手机触屏版网站"."手机WAP版网站"."手机APP应用软件",其三者间有何区别呢? ...

  7. 右键计算机没有软件删减,右键菜单太长会导致电脑卡顿?轻松删除右键菜单无用项!...

    原标题:右键菜单太长会导致电脑卡顿?轻松删除右键菜单无用项! 有些人的电脑桌面看起来很整洁有序,结果点一下右键要卡 2秒,弹出来的菜单比脸都长,新建一个文件夹都要找半天. 右键菜单一直是各大软件刷存在 ...

  8. html5 手机站点,HTML5移动端手机网站基本模板 HTML5基本结构

    HTML5移动端最基本网页模板代码(以下HTML代码可直接拷贝复制使用): 手机网站最基本HTML模板 body{font-size:62.5%;font-family:"Microsoft ...

  9. android allapp图标拖动,RecyclerView 拖拽移动,长按小图标拖拽,侧滑删除

    RecyclerView拖拽移动,长按小图标拖拽,侧滑删除 长按小图标拖拽.gif 侧滑删除.gif Android RecyclerView出来也很多年了,是非常成熟的控件,Github上工具一堆, ...

最新文章

  1. 华为鸿蒙智慧屏怎么样,65寸华为智慧屏怎么样?4000元选哪个好?
  2. 自动生成Android界面,面向Android的Web Service界面自动生成技术研究
  3. 【引用】Android程序实现完全退出
  4. nginx_gzip压缩提升网站的传输速度
  5. 模块化与nodeJs
  6. 大话网站---从Hello World到高并发网站
  7. linux 忘记密码(以centos6为例)
  8. Quartz任务调度
  9. Android 使用SQLiteDatabase操作SQLite数据库(二)
  10. java 阻塞队列 BQ_阻塞队列 BlockingQueue的使用(二)
  11. vue开发:前端项目模板
  12. 中国省市SQL表---市级行政单位表
  13. excel转word_这3种Word、Excel格式不变的互转方法,实在太好用了
  14. 从APP测试角度看新增长应用类型如何取得优势
  15. Mac制作操作系统启动盘
  16. Markdown Preview Enhanced (MPE)踩坑记录
  17. powershell下使用linux命令,Windows 10系统下PowerShell命令使用技巧
  18. 计算机无法关闭密码保护,Windows 10不会关闭密码保护共享
  19. 运用三角不等式加速Kmeans聚类算法
  20. 区块链常见共识机制简介

热门文章

  1. 西门子1500PLC机器人焊接程序(西门子PLC+西门子触摸屏)
  2. ipad可以装二级计算机培训吗,当初给孩子买iPad上网课的家长,开始后悔了……
  3. Java之List系列--ArrayList扩容的原理
  4. 记录win7安装Docker for Windows(DockerToolbox)的一记大坑:wating for an ip....卡死
  5. linux复制文件多份,Linux下同时复制多个文件
  6. 一分钟带你快速认识S参数
  7. 【C++小游戏】推箱子代码+详解
  8. 百度 android 市场,百度Q2报告:Android市场份额21.4% 同比增长890%
  9. 不安全的文件上传基本原理(Unsafe file upload)
  10. 数据保护与云不离不弃,云中护航渐成行业主旋律