网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

html5手机触屏,html5移动端

html5上下滑动“翻页”实现,是真正的翻页

HTML5手机上下滑动翻页特效是一款手机移动端触屏滑动效果实现完整代码如下:

创新互联公司从2013年创立,是专业互联网技术服务公司,拥有项目网站设计、成都网站建设网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元芮城做网站,已为上家服务,为芮城各地企业和个人服务,联系电话:18980820575

1、html5页面代码

!DOCTYPE html

htmlheadmeta http-equiv="Content-Type" content="text/html; charset=UTF-8"

titleHTML5手机页面触屏滑动上下翻页特效/title

meta charset="utf-8"

meta name="apple-touch-fullscreen" content="YES"

meta name="format-detection" content="telephone=no"

meta name="apple-mobile-web-app-capable" content="yes"

meta name="apple-mobile-web-app-status-bar-style" content="black"

meta http-equiv="Expires" content="-1"

meta http-equiv="pragram" content="no-cache"

link rel="stylesheet" type="text/css" href="./hamer_files/main.css"

link rel="stylesheet" type="text/css" href="./hamer_files/endpic.css"

script type="text/javascript" src="./hamer_files/offline.js"/script

meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi"

/head

body class="s-bg-ddd pc no-3d perspective yes-3d" style="-webkit-user-select: none;"

section class="u-alert"

  img style="display:none;" src="./hamer_files/loading_large.gif"

  div class="alert-loading z-move"

      div class="cycleWrap" span class="cycle cycle-1"/span

          span class="cycle cycle-2"/spanspan class="cycle cycle-3"/spanspan class="cycle cycle-4"/span

      /div

      div class="lineWrap" span class="line line-1"/spanspan class="line line-2"/spanspan class="line line-3"/span

      /div

  /div

/section

section class="u-arrow"

  p class="css_sprite01"/p

/section

section class="p-ct transformNode-2d transformNode-3d" style="height: 918px;"

  div class="translate-back" style="height: 918px;"

      div class="m-page m-fengye" data-page-type="info_pic3" data-statics="info_pic3" style="height: 918px;"

          div class="page-con lazy-finish" data-position="50% 50%" data-size="cover" style="height: 920px; background-image: url(hamer_files/1.jpg); background-size: cover; background-position: 50% 50%;"/div

      /div

      div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;"

          div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/2.jpg); background-size: cover; background-position: 50% 50%;"/div

      /div

      div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;"

          div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/3.jpg); background-size: cover; background-position: 50% 50%;"/div

      /div

      div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;"

          div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/4.jpg); background-size: cover; background-position: 50% 50%;"/div

      /div

      div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;"

          div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/5.jpg); background-size: cover; background-position: 50% 50%;"/div

      /div

      div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;"

          div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/6.jpg); background-size: cover; background-position: 50% 50%;"/div

      /div

      div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;"

          div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/7.jpg); background-size: cover; background-position: 50% 50%;"/div

      /div

      div class="m-page m-bigTxt f-hide" data-page-type="bigTxt" data-statics="info_list" style="height: 918px;"

          div class="page-con j-txtWrap lazy-finish" data-position="50% 50%" data-size="cover" style="background-image: url(hamer_files/8.jpg); background-size: cover; background-position: 50% 50%;"/div

      /div

  /div

/section

section class="u-pageLoading"

  img src="./hamer_files/load.gif" alt="loading"

/section

script src="./hamer_files/init.mix.js" type="text/javascript" charset="utf-8"/script

script src="./hamer_files/coffee.js" type="text/javascript" charset="utf-8"/script

script src="./hamer_files/99_main.js" type="text/javascript" charset="utf-8"/script

/body/html

2、css代码:

@charset "utf-8";

.ad_foot li { margin:0 auto 1em; font-size:1.8em; padding:15px; background:#FFF;}

.ad_foot li a {display:block;}

.ad_foot li .l {width:75px; height:75px; float:left; overflow:hidden;}

.ad_foot li .l img {width:75px; width:75px;}

.ad_foot li .r {width:78%; float:left; margin-left:30px; color:#666; overflow:hidden;}

.ad_foot li .r p {color:#999; font-size:1.2em; }

.ad_foot li .r span {font-size:0.8em;}

.ad_foot li .r i {font-style:normal;}

.lazy-img, .lazy-finish{background-color:#f0eded;}

.page-list{font-size:20px;font-family: "Microsoft yahei";padding-left:17px;padding-top:30px;height:35px;border-bottom:1px solid #b5b5b5;display:none;}

.ad_foot{padding:15px 15px 0 15px;}

/*声音播放按钮*/

#song_img {width:293px; height:41px; display:block; position:absolute; right:4.1em; top:1.6em; font-size:1.7em; text-align:center; line-height:41px; color:#FFF; background:url(../img/music_c3.png) no-repeat 0 0;}

/*底部推荐*/

.ad_list{margin-top:2em;}.ad_list li {width:46%; background:none; padding:0; float:left;margin-bottom: 1em;}

.ad_list li.r {float:right;}.ad_list li a img {width:100%; height:auto;}

.ad_foot h3 {width:100%; height:48px; line-height:48px; background:#F9F5EC;}

.ad_foot h3 a {display:inline-block; color:#444; width:50%; text-align:center; font-size:1.5em; height:48px; border-bottom:2px solid #FF9240;}

.ad_foot h3 a.active {color:#FFF; background:#FF9240;}

.magazine_1 li {

width:100%;

margin-bottom: 1em;

font-size: 1.8em;

padding: 15px;

background: #FFF;}

.magazine_1 li a {display:block;}

.magazine_1 li .l {width: 75px;

height: 75px;

float: left;

overflow: hidden;}

.magazine_1 li .l img {width:75px; height:75px;}

.magazine_1 li .r {width: 78%;

float: left;

margin-left: 30px;

color: #666;

overflow: hidden;}

.magazine_1 li .r p {

color: #999;

font-size: 1.2em;

.magazine_1 li .r span {font-size:0.8em;}

.ad_foot li .r i {font-style:normal;}

3、运行效果如下:

html5 拖动效果怎么在手机上实现

html5 拖动效果在手机上实现方法是调用drag和drop一系列函数实现的。

注意:拖拽源在拖拽操作结束将得到dragend事件对象,不管操作成功与否。

举例:

定义可拖放内容

div id="columns"

div class="column" draggable="true"headerA/header/div

div class="column" draggable="true"headerB/header/div

div class="column" draggable="true"headerC/header/div

/div

2、监听拖动事件

可附加大量不同事件以监听整个拖放过程:

dragstart

drag

dragenter

dragleave

dragover

drop

dragend

a.这里是开始拖拽

function handleDragStart(e) {

this.style.opacity = '0.4';  // this / e.target is the source node.

}

var cols = document.querySelectorAll('#columns .column');

[].forEach.call(cols, function(col) {

col.addEventListener('dragstart', handleDragStart, false);

});

b.dragenter、dragover 和 dragleave 事件处理程序可用于在拖动过程中提供额外的可视化提示。例如,在拖动期间将鼠标悬停在某一列上方时,其边框可能会变成虚线。这样,用户就能知道这些列也是放置的目标区域。

html5的开发 关于触屏

ontouchstart

ontouchmove

ontouchend

ontouchcancel

移动平台的四个触摸事件

因此他们的顺序是需要注意的:touchstart → mouseover → mousemove → mousedown → mouseup → click1

/**

* onTouchEvent

*/

var div = document.getElementById("div");

//touchstart类似mousedown

div.ontouchstart = function(e){

//事件的touches属性是一个数组,其中一个元素代表同一时刻的一个触控点,从而可以通过touches获取多点触控的每个触控点

//由于我们只有一点触控,所以直接指向[0]

var touch = e.touches[0];

//获取当前触控点的坐标,等同于MouseEvent事件的clientX/clientY

var x = touch.clientX;

var y = touch.clientY;

};

//touchmove类似mousemove

div.ontouchmove = function(e){

//可为touchstart、touchmove事件加上preventDefault从而阻止触摸时浏览器的缩放、滚动条滚动等

e.preventDefault();

};

//touchend类似mouseup

div.ontouchup = function(e){

//nothing to do

};

WAP网站,3G网站,html5触屏版有什么区别?

1、手机网站一般又称作WAP网站 , 而传统网站又称作Web网站,WAP网站可分为WAP1.X和WAP2.0网站。WAP1.X功能简单、界面粗糙,而WAP2.0的手机网站功能和界面都与Web网站相接近。WAP2.0的手机网站可以在电脑上直接用浏览器访问,而WAP1.X的网站,需要模拟器或者给浏览器安装相应的插件方可。

2、3G网站是手机网站领域为迎合3G的推广而创造的概念,3G网站就是手机WAP网站。3G网站采用wap2.0编写,支持一些xhtml和CSS。

3、html5触屏版主要针对高端智能手机,可以给用户呈现华丽的网页视觉效果。HTML5触屏版采用最新的技术HTML5编写,属于智能机时代产物,因为智能手机的性能已经很强大了,可以直接加载html。

WAP网站,3G网站,html5触屏版有什么区别

wap网站:通常所说的wap网站就是指的移动端网站,就是手机端网站的意思。

3G网站:3G是频段,3G网站这种说法应该不太恰当,可以理解为wap网站的另一种叫法。

HTML5触屏版:HTML5是下一代HTML(超文本编辑语言),主要用于制作比现在网页更加方便好看的效果。目前主要应用于移动端,未来flash将有可能被HTML5所替代。

这三者的区别是 WAP网站就是移动端网站,3G网站说法不恰当,可以理解为就是移动端网站,HTML5是移动端网站开发的一种方式,属于WAP网站当中的一种。


网页题目:html5手机触屏,html5移动端
网址分享:http://bjjierui.cn/article/phedec.html

其他资讯