威尼斯手机平台登陆-官方网站登录

威尼斯手机平台登陆为您带来世界三大博彩公司最新相关资讯,威尼斯官方网站登录充分考虑到不同地域网民的不同需求,威尼斯手机平台登陆良好的用户界面,人性化的操作,实用的功能设计使其广泛受到欢迎,推动实体出版、影视、动漫、游戏等相关文化产业的发展。

您的位置:威尼斯手机平台登陆 > 威尼斯登录首页 > 明日大家要享受的有个别使用就是借助HTML5和jQuery的,付费投稿布署

明日大家要享受的有个别使用就是借助HTML5和jQuery的,付费投稿布署

发布时间:2020-02-27 14:02编辑:威尼斯登录首页浏览(62)

    本文由码农网 – 小峰原创,转载请看清文末的转载要求,欢迎参与我们的付费投稿计划!

    昨天我收集了8款效果给力的HTML5/CSS3应用插件,有一些HTML5动画非常绚丽,也有一些CSS3按钮比较实用,感兴趣的朋友都看看吧。

    也许在5年前,HTML5还是一种很前卫的技术,大家还只是将它当做实验来看待,更别说产品应用了。但是现在HTML5已经非常流行,无论从PC端还是移动端,HTML5都扮演着非常重要的角色。今天我们要分享的一些应用就是基于HTML5和jQuery的,加上源代码的下载,你一定会觉得很受用的,赶紧分享吧。

    这是一款基于HTML5和CSS3的3D动画特效,与之前的3D特效不同的是,这款是完全用HTML5特性实现的,而并非用多张图片叠加起来。这款3D动画还有一个特点是可以无限的旋转,从而可以从多个视角来观察HTML5 Logo。

    1、HTML5/CSS3实现笑脸动画 非常可爱

    关于纯CSS3绘制的人物我们在之前就分享过一些了,像纯CSS3绘制可爱小男孩动画、纯CSS3人物行走动画等。今天我们要分享一款基于纯CSS3实现的笑脸动画,我们只要在面部滑动鼠标,即可让人物的眼睛嘴巴动起来,实现微笑的效果,还挺可爱的。

    图片 1

    在线演示        源码下载

    HTML5线性图表 图表数据区域可着色

    这是一款基于Canvas的HTML5图表应用,在图表数据初始化的时候伴随动画效果。

    核心jQuery代码:

    图片 2图片 3

    var myData = {    labels : ["Mo","Di","Mi","Do","Fr","Sa","So"],    datasets : [      {        fillColor : "rgba(220,220,220,.5)",        strokeColor : "rgba(220,220,220,1)",        pointColor : "rgba(220,220,220,1)",        pointStrokeColor : "#fff",        data : [65,59,90,81,56,55,40]      },      {        fillColor : "rgba(90,190,90,.5)",        strokeColor : "rgba(90,190,90,1)",        pointColor : "rgba(90,190,90,1)",        pointStrokeColor : "#fff",        data : [40,48,40,40,90,27,90]      }    ]  }    new Chart(document.getElementById("canvas").getContext("2d")).Line(myData)
    

    View Code

    图片 4

    在线演示        源码下载

    图片 5

    2、jQuery+Html5实现唯美表白代码:亲爱的女神,我来了!

    jQuery+Html5实现唯美表白的动画代码:浪漫的动画效果,程序员表白必备!

    图片 6

    在线演示        源码下载

    HTML5/CSS3仿Facebook登录表单

    这是一款利用CSS3实现的创意表单,它的外观是模仿Facebook的。

    核心CSS代码:

    图片 7图片 8

    .login-form-wrap {    background: #5170ad;    background: -moz-radial-gradient(center, ellipse cover, #5170ad 0%, #355493 100%);    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #5170ad), color-stop(100%, #355493));    background: -webkit-radial-gradient(center, ellipse cover, #5170ad 0%, #355493 100%);    background: -o-radial-gradient(center, ellipse cover, #5170ad 0%, #355493 100%);    background: -ms-radial-gradient(center, ellipse cover, #5170ad 0%, #355493 100%);    background: radial-gradient(ellipse at center, #5170ad 0%, #355493 100%);    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5170ad', endColorstr='#355493',GradientType=1 );    border: 1px solid #2d416d;    box-shadow: 0 1px #5670a4 inset, 0 0 10px 5px rgba(0, 0, 0, 0.1);    border-radius: 5px;    position: relative;    width: 360px;    height: 380px;    margin: 10px auto 20px auto;    padding: 50px 30px 0 30px;    text-align: center;  }  .login-form-wrap:before {    background: url(http://i.imgur.com/0vLxyVB.png);    display: block;    content: '';    width: 58px;    height: 19px;    top: 10px;    left: 10px;    position: absolute;  }  .login-form-wrap > h1 {    margin: 0 0 50px 0;    padding: 0;    font-size: 26px;    color: #fff;  }  .login-form-wrap > h5 {    margin-top: 40px;  }  .login-form-wrap > h5 > a {    font-size: 14px;    color: #fff;    text-decoration: none;    font-weight: 400;  }    .login-form input[type="email"], .login-form input[type="password"] {    width: 100%;    border: 1px solid #314d89;    outline: none;    padding: 12px 20px;    color: #afafaf;    font-weight: 400;    font-family: 'Lato', sans-serif;    cursor: pointer;  }  .login-form input[type="email"] {    border-bottom: none;    border-radius: 4px 4px 0 0;    padding-bottom: 13px;    box-shadow: 0 -1px 0 #e0e0e0 inset, 0 1px 2px rgba(0, 0, 0, 0.23) inset;  }  .login-form input[type="password"] {    border-top: none;    border-radius: 0 0 4px 4px;    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.23) inset, 0 1px 2px rgba(255, 255, 255, 0.1);  }  .login-form input[type="submit"] {    font-family: 'Lato', sans-serif;    font-weight: 400;    background: #e0e0e0;    background: -moz-linear-gradient(top, #e0e0e0 0%, #cecece 100%);    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e0e0e0), color-stop(100%, #cecece));    background: -webkit-linear-gradient(top, #e0e0e0 0%, #cecece 100%);    background: -o-linear-gradient(top, #e0e0e0 0%, #cecece 100%);    background: -ms-linear-gradient(top, #e0e0e0 0%, #cecece 100%);    background: linear-gradient(to bottom, #e0e0e0 0%, #cecece 100%);    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e0e0e0', endColorstr='#cecece',GradientType=0 );    display: block;    margin: 20px auto 0 auto;    width: 100%;    border: none;    border-radius: 3px;    padding: 8px;    font-size: 17px;    color: #636363;    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);    font-weight: 700;    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.17), 0 1px 0 rgba(255, 255, 255, 0.36) inset;  }  .login-form input[type="submit"]:hover {    background: #DDD;  }  .login-form input[type="submit"]:active {    padding-top: 9px;    padding-bottom: 7px;    background: #C9C9C9;  }
    

    View Code

    图片 9

    在线演示        源码下载

    在线演示源码下载

    3、CSS3 3D发光按钮 立体感十分强烈

    这是一款很特别的CSS3按钮,按钮整体是灰黑色主题,每一个按钮在按下时有非常漂亮的3D效果,并且按钮上的文字也有发光的特效。这款CSS3 3D按钮和之前介绍的几款按钮类似,都可以在点击按钮的时候让按钮悬浮下落,使得按钮整体非常炫酷。

    图片 10

    在线演示        源码下载

    HTML5/CSS3超酷进度条 不同进度多种颜色

    这是一款很酷的HTML5进度条插件,有不错的动画效果。

    核心jQuery代码:

    图片 11图片 12

    var Loader = function () {        var loader = document.querySelector('.loader-container'),        meter = document.querySelector('.meter'),        k, i = 1,        counter = function () {          if (i <= 100) {               meter.innerHTML = i.toString();            i++;          } else {            window.clearInterval(k);          }        };        return {        init: function (options) {        options = options || {};        var time = options.time ? options.time : 0,              interval = time/100;                  loader.classList.add('run');        k = window.setInterval(counter, interval);         setTimeout(function () {                    loader.classList.add('done');        }, time);      },    }  }();    Loader.init({        // If you have changed the @time in LESS, update this number to the corresponding value. Measured in miliseconds.        time: 10000  });
    

    View Code

    图片 13

    在线演示        源码下载

    HTML代码

    <div class="link-overlay">
    
    </div>
    <canvas id="canvas" style="background-color:#ddd"></canvas>
    

    4、HTML5/CSS3激光宝剑动画 有星球大战的感觉

    利用HTML5技术,我们可以实现很多漂亮的动画效果,这里大家可以去看之前分享的内容。今天我们一起来感受一下星球大战的画面,我们可以利用CSS3来实现一把把各种各样的激光宝剑,并且宝剑还可以旋转挥舞,这HTML5宝剑动画还挺有意思的,大家可以看看。

    图片 14

    在线演示        源码下载

    CSS3 3D发光切换按钮 模拟效果很逼真

    这款CSS3 3D开关切换按钮效果还是很不错的。

    核心CSS代码:

    图片 15图片 16

    .switch input {    top: 0;     right: 0;     bottom: 0;     left: 0;    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";    filter: alpha(opacity=0);    -moz-opacity: 0;    opacity: 0;    z-index: 100;    position: absolute;    width: 100%;    height: 100%;    cursor: pointer;  }    .switch {      width: 180px;      height: 55px;      position: relative;      margin: 100px auto;  }    .switch label {      display: block;      width: 80%;      height: 100%;      position: relative;      background: #1F2736; /*#121823*/      background: linear-gradient(#121823, #161d2b);      border-radius: 30px 30px 30px 30px;      box-shadow:          inset 0 3px 8px 1px rgba(0,0,0,0.5),          inset 0 1px 0 rgba(0,0,0,0.5),          0 1px 0 rgba(255,255,255,0.2);          -webkit-transition: all .5s ease;  transition: all .5s ease;    }    .switch input ~ label i {      display: block;      height: 51px;      width: 51px;      position: absolute;      left: 2px;      top: 2px;      z-index: 2;      border-radius: inherit;      background: #283446; /* Fallback */      background: linear-gradient(#36455b, #283446);      box-shadow:          inset 0 1px 0 rgba(255,255,255,0.2),          0 0 8px rgba(0,0,0,0.3),          0 12px 12px rgba(0,0,0,0.4);      -webkit-transition: all .5s ease;  transition: all .5s ease;  }      .switch label + span {      content: "";      display: inline-block;      position: absolute;      right: 0px;      top: 17px;      width: 18px;      height: 18px;      border-radius: 10px;      background: #283446;   background: gradient-gradient(#36455b, #283446);  box-shadow:            inset 0 1px 0 rgba(0,0,0,0.2),            0 1px 0 rgba(255,255,255,0.1),            0 0 10px rgba(185,231,253,0),    inset 0 0 8px rgba(0,0,0,0.9),    inset 0 -2px 5px rgba(0,0,0,0.3),    inset 0 -5px 5px rgba(0,0,0,0.5);       -webkit-transition: all .5s ease;      transition: all .5s ease;      z-index: 2;  }     /* Toggle */  .switch input:checked ~ label + span {       content: "";      display: inline-block;      position: absolute;      width: 18px;      height: 18px;      border-radius: 10px;      -webkit-transition: all .5s ease;      transition: all .5s ease;      z-index: 2;      background: #b9f3fe;   background: gradient-gradient(#ffffff, #77a1b9);  box-shadow:                    inset 0 1px 0 rgba(0,0,0,0.1),            0 1px 0 rgba(255,255,255,0.1),            0 0 10px rgba(100,231,253,1),            inset 0 0 8px rgba( 61,157,247,0.8),    inset 0 -2px 5px rgba(185,231,253,0.3),    inset 0 -3px 8px rgba(185,231,253,0.5);     }    .switch input:checked ~ label i {      left: auto;      left: 63%;      box-shadow:          inset 0 1px 0 rgba(255,255,255,0.2),          0 0 8px rgba(0,0,0,0.3),          0 8px 8px rgba(0,0,0,0.3),          inset -1px 0 1px #b9f3fe;        -webkit-transition: all .5s ease;  transition: all .5s ease;  }
    

    View Code

    图片 17

    在线演示        源码下载

    JavaScript代码

    // bind to window onload handler
    window.addEventListener('load', onloadHandler, false);
    
    /**
     * Window onload handler
     */
    function onloadHandler()
    {
       var canvas = document.getElementById('canvas');
       canvas.width = window.innerWidth;
       canvas.height = window.innerHeight;
       var k3dmain = new K3D.Controller(canvas, true);
    
       // generate 3D objects
    
       var obj1 = new K3D.K3DObject();
       with (obj1)
       {
          drawmode = "solid";
          shademode = "lightsource";
          sortmode = "unsorted";
          addphi = -0.5;
          abouty = -90;
          perslevel = 1000;
          init(
             [{x:-80,y:180,z:0},{x:0,y:180,z:-80},{x:0,y:0,z:-80},{x:-80,y:20,z:0},{x:-50,y:150,z:-30},{x:0,y:150,z:-80},{x:0,y:130,z:-80},{x:-30,y:130,z:-50},{x:-28,y:110,z:-52},{x:0,y:110,z:-80},{x:0,y:90,z:-80},{x:-45,y:90,z:-35},{x:-44,y:80,z:-36},{x:-25,y:80,z:-55},{x:-22,y:66,z:-58},{x:0,y:60,z:-80},{x:0,y:40,z:-80},{x:-40,y:50,z:-40}],
             [],
             [{color:[227,76,38],vertices:[0,1,2,3,0]},{color:[235,235,235],vertices:[4,5,6,7,8,9,10,11,4]},{color:[235,235,235],vertices:[12,13,14,15,16,17,12]}]
          );
       }
       k3dmain.addK3DObject(obj1);
    
       var obj2 = new K3D.K3DObject();
       with (obj2)
       {
          drawmode = "solid";
          shademode = "lightsource";
          sortmode = "unsorted";
          addphi = -0.5;
          abouty = -90;
          perslevel = 1000;
          init(
             [{x:0,y:180,z:-80},{x:80,y:180,z:0},{x:80,y:20,z:0},{x:0,y:0,z:-80},{x:0,y:165,z:-80},{x:68,y:165,z:-12},{x:55,y:35,z:-25},{x:0,y:20,z:-80},{x:0,y:150,z:-80},{x:50,y:150,z:-30},{x:47,y:130,z:-33},{x:0,y:130,z:-80},{x:0,y:110,z:-80},{x:45,y:110,z:-35},{x:40,y:50,z:-40},{x:0,y:40,z:-80},{x:0,y:60,z:-80},{x:20,y:66,z:-60},{x:23,y:90,z:-57},{x:0,y:90,z:-80}],
             [],
             [{color:[227,76,38],vertices:[0,1,2,3,0]},{color:[240,101,41],vertices:[4,5,6,7,4]},{color:[235,235,235],vertices:[8,9,10,11,8]},{color:[235,235,235],vertices:[12,13,14,15,16,17,18,19,12]}]
          );
       }
       k3dmain.addK3DObject(obj2);
    
       var obj3 = new K3D.K3DObject();
       with (obj3)
       {
          drawmode = "solid";
          shademode = "lightsource";
          sortmode = "unsorted";
          addphi = -0.5;
          abouty = -90;
          perslevel = 1000;
          init(
             [{x:80,y:180,z:0},{x:0,y:180,z:80},{x:0,y:0,z:80},{x:80,y:20,z:0},{x:50,y:150,z:30},{x:0,y:150,z:80},{x:0,y:130,z:80},{x:30,y:130,z:50},{x:28,y:110,z:52},{x:0,y:110,z:80},{x:0,y:90,z:80},{x:45,y:90,z:35},{x:44,y:80,z:36},{x:25,y:80,z:55},{x:22,y:66,z:58},{x:0,y:60,z:80},{x:0,y:40,z:80},{x:40,y:50,z:40}],
             [],
             [{color:[227,76,38],vertices:[0,1,2,3,0]},{color:[235,235,235],vertices:[4,5,6,7,8,9,10,11,4]},{color:[235,235,235],vertices:[12,13,14,15,16,17,12]}]
          );
       }
       k3dmain.addK3DObject(obj3);
    
       var obj4 = new K3D.K3DObject();
       with (obj4)
       {
          drawmode = "solid";
          shademode = "lightsource";
          sortmode = "unsorted";
          addphi = -0.5;
          abouty = -90;
          perslevel = 1000;
          init(
             [{x:0,y:180,z:80},{x:-80,y:180,z:0},{x:-80,y:20,z:0},{x:0,y:0,z:80},{x:0,y:165,z:80},{x:-68,y:165,z:12},{x:-55,y:35,z:25},{x:0,y:20,z:80},{x:0,y:150,z:80},{x:-50,y:150,z:30},{x:-47,y:130,z:33},{x:0,y:130,z:80},{x:0,y:110,z:80},{x:-45,y:110,z:35},{x:-40,y:50,z:40},{x:0,y:40,z:80},{x:0,y:60,z:80},{x:-20,y:66,z:60},{x:-23,y:90,z:57},{x:0,y:90,z:80}],
             [],
             [{color:[227,76,38],vertices:[0,1,2,3,0]},{color:[240,101,41],vertices:[4,5,6,7,4]},{color:[235,235,235],vertices:[8,9,10,11,8]},{color:[235,235,235],vertices:[12,13,14,15,16,17,18,19,12]}]
          );
       }
       k3dmain.addK3DObject(obj4);
    
       var objBase = new K3D.K3DObject();
       with (objBase)
       {
          drawmode = "solid";
          shademode = "lightsource";
          sortmode = "unsorted";
          addphi = -0.5;
          abouty = -90;
          perslevel = 1000;
          init(
             [{x:0,y:0,z:-80},{x:-80,y:20,z:0},{x:0,y:0,z:80},{x:80,y:20,z:0}],
             [],
             [{color:[227,76,38],vertices:[0,2,1,0]},{color:[227,76,38],vertices:[0,3,2,0]}]
          );
       }
       k3dmain.addK3DObject(objBase);
    
       var objHtml = new K3D.K3DObject();
       with (objHtml)
       {
          drawmode = "solid";
          shademode = "lightsource";
          //sortmode = "unsorted";
          color = [64,64,64];
          doublesided = true;
          addphi = -0.5;
          abouty = 100;
          scale = 0.75;
          perslevel = 1000;
          init(
             [{x:-80,y:40,z:0},{x:-70,y:40,z:0},{x:-70,y:30,z:0},{x:-60,y:30,z:0},{x:-60,y:40,z:0},{x:-50,y:40,z:0},{x:-50,y:10,z:0},{x:-60,y:10,z:0},{x:-60,y:20,z:0},{x:-70,y:20,z:0},{x:-70,y:10,z:0},{x:-80,y:10,z:0},{x:-40,y:40,z:0},{x:-10,y:40,z:0},{x:-10,y:30,z:0},{x:-20,y:30,z:0},{x:-20,y:10,z:0},{x:-30,y:10,z:0},{x:-30,y:30,z:0},{x:-40,y:30,z:0},{x:0,y:40,z:0},{x:10,y:40,z:0},{x:20,y:30,z:0},{x:30,y:40,z:0},{x:40,y:40,z:0},{x:40,y:10,z:0},{x:30,y:10,z:0},{x:30,y:30,z:0},{x:20,y:20,z:0},{x:10,y:30,z:0},{x:10,y:10,z:0},{x:0,y:10,z:0},{x:50,y:40,z:0},{x:60,y:40,z:0},{x:60,y:20,z:0},{x:80,y:20,z:0},{x:80,y:10,z:0},{x:50,y:10,z:0}],
             [],
             [{vertices:[0,1,2,3,4,5,6,7,8,9,10,11,0]},{vertices:[12,13,14,15,16,17,18,19,12]},{vertices:[20,21,22,23,24,25,26,27,28,29,30,31,20]},{vertices:[32,33,34,35,36,37,32]}]
          );
       }
       k3dmain.addK3DObject(objHtml);
    
       // add render loop callback
       var ctx = canvas.getContext('2d');
       var rotationOffset = 0;
       var len = (canvas.height > canvas.width ? canvas.height : canvas.width) * 0.7;
       k3dmain.clearBackground = false;
       k3dmain.callback = function()
       {
          // manually clear bg - as we want to render some extra goodies
          ctx.clearRect(0, 0, canvas.width, canvas.height);
    
          // draw bg effect before K3D does its 3D rendering
          ctx.save();
          ctx.translate(canvas.width/2, canvas.height/2);
          ctx.rotate(rotationOffset);
    
          // first fill pass - outer rays
          var RAYCOUNT = 24;
          ctx.fillStyle = "#eee";
          ctx.beginPath();
          for (var i=0; i<RAYCOUNT; i++)
          {
             // rotate context
             ctx.rotate(TWOPI / RAYCOUNT);
             ctx.moveTo(0, 0);
             ctx.lineTo(-20, len);
             ctx.lineTo(20, len);
          }
          ctx.closePath();
          ctx.fill();
          // second fill pass - inner rays
          ctx.fillStyle = "#fff";
          ctx.beginPath();
          for (var i=0; i<RAYCOUNT; i++)
          {
             // rotate context
             ctx.rotate(TWOPI / RAYCOUNT);
             ctx.moveTo(0, 0);
             ctx.lineTo(-15, len);
             ctx.lineTo(15, len);
          }
          ctx.closePath();
          ctx.fill();
          ctx.restore();
          rotationOffset += 0.005;
    
          // apply user interaction to rotation
          for (var i=0, objs=k3dmain.objects; i<objs.length; i++)
          {
             objs[i].ophi += targetRotationX;
          }
    
          if (targetRotationX > -0.5) targetRotationX -= 0.05;
          else if (targetRotationX < -0.55) targetRotationX += 0.05;
          if (targetRotationX > -0.55 && targetRotationX < -0.5) targetRotationX = -0.5;
       };
    
       // start demo loop
       k3dmain.paused = true;
       setInterval(function(){k3dmain.tick()}, 1000/60);
    }
    
    // nifty drag/touch event capture code borrowed from Mr Doob http://mrdoob.com/
    var targetRotationX = 0;
    var targetRotationOnMouseDownX = 0;
    var mouseX = 0;
    var mouseXOnMouseDown = 0;
    var targetRotationY = 0;
    var targetRotationOnMouseDownY = 0;
    var mouseY = 0;
    var mouseYOnMouseDown = 0;
    
    var windowHalfX = window.innerWidth / 2;
    var windowHalfY = window.innerHeight / 2;
    
    document.addEventListener('mousedown', onDocumentMouseDown, false);
    document.addEventListener('touchstart', onDocumentTouchStart, false);
    document.addEventListener('touchmove', onDocumentTouchMove, false);
    
    function onDocumentMouseDown( event ) {
    
        event.preventDefault();
    
        document.addEventListener('mousemove', onDocumentMouseMove, false);
        document.addEventListener('mouseup', onDocumentMouseUp, false);
        document.addEventListener('mouseout', onDocumentMouseOut, false);
    
        mouseXOnMouseDown = event.clientX - windowHalfX;
        targetRotationOnMouseDownX = targetRotationX;
        mouseYOnMouseDown = event.clientY - windowHalfY;
        targetRotationOnMouseDownY = targetRotationY;
    }
    
    function onDocumentMouseMove( event )
    {
        mouseX = event.clientX - windowHalfX;
        targetRotationX = targetRotationOnMouseDownX + (mouseX - mouseXOnMouseDown) * 0.02;
        mouseY = event.clientY - windowHalfY;
        targetRotationY = targetRotationOnMouseDownY + (mouseY - mouseYOnMouseDown) * 0.02;
    }
    
    function onDocumentMouseUp( event )
    {
        document.removeEventListener('mousemove', onDocumentMouseMove, false);
        document.removeEventListener('mouseup', onDocumentMouseUp, false);
        document.removeEventListener('mouseout', onDocumentMouseOut, false);
    }
    
    function onDocumentMouseOut( event )
    {
        document.removeEventListener('mousemove', onDocumentMouseMove, false);
        document.removeEventListener('mouseup', onDocumentMouseUp, false);
        document.removeEventListener('mouseout', onDocumentMouseOut, false);
    }
    
    function onDocumentTouchStart( event )
    {
        if (event.touches.length == 1)
        {
            event.preventDefault();
    
            mouseXOnMouseDown = event.touches[0].pageX - windowHalfX;
            targetRotationOnMouseDownX = targetRotationX;
            mouseYOnMouseDown = event.touches[0].pageY - windowHalfY;
            targetRotationOnMouseDownY = targetRotationY;
        }
    }
    
    function onDocumentTouchMove( event )
    {
        if (event.touches.length == 1)
        {
            event.preventDefault();
    
            mouseX = event.touches[0].pageX - windowHalfX;
            targetRotationX = targetRotationOnMouseDownX + (mouseX - mouseXOnMouseDown) * 0.05;
            mouseY = event.touches[0].pageY - windowHalfY;
            targetRotationY = targetRotationOnMouseDownY + (mouseX - mouseYOnMouseDown) * 0.05;
        }
    }
    

    在线演示源码下载

    5、9组不同颜色的CSS3按钮 带3D立体效果

    这款CSS3按钮实现起来比较容易,也没有之前分享的CSS3按钮那么绚丽,但是小编认为很实用。它默认给大家配置了9种常用的颜色,当然你也可以指定其他颜色。按钮整体看上去有3D立体的效果,这是利用了CSS3的-webkit-linear-gradient颜色渐变属性,非常强大。

    图片 18

    在线演示        源码下载

    CSS3/SVG质感背景小图标 镂空效果图标按钮

    图片 19

    在线演示        源码下载

    6、CSS3 3D弹性按钮效果 带弹性质感

    之前我们分享过一款非常酷的纯CSS3 3D按钮 按钮酷似牛奶般剔透,这款按钮的特点有二:牛奶般的立体外观,按钮按下时非常柔和的弹性效果。今天要分享的这款CSS3按钮和这款按钮差不错,也同样拥有3D的效果,按钮在按下时带有弹性质感。

    图片 20

    在线演示        源码下载

    HTML5/CSS3弹出提示框 内置功能按钮

    这款Html5 教程非常实用,是一款带有动画特效的弹出提示框,样式也很不错。

    核心jQuery代码:

    图片 21图片 22

    function closeMessage(el) {    el.addClass('is-hidden');  }    $('.js-messageClose').on('click', function(e) {    closeMessage($(this).closest('.Message'));  });    $('#js-helpMe').on('click', function(e) {    alert('Help you we will, young padawan');    closeMessage($(this).closest('.Message'));  });    $('#js-authMe').on('click', function(e) {    alert('Okelidokeli, requesting data transfer.');    closeMessage($(this).closest('.Message'));  });    $('#js-showMe').on('click', function(e) {    alert("You're off to our help section. See you later!");    closeMessage($(this).closest('.Message'));  });    $(document).ready(function() {    setTimeout(function() {      closeMessage($('#js-timer'));    }, 5000);  });
    

    View Code

    图片 23

    在线演示        源码下载

    7、jQuery视差插件 突出显示两个图像之间的差异

    图片 24

    在线演示        源码下载

    HTML5柱状图表 可合并多张图表的数据

    又是一款HTML5图表应用,外观很普通,但是其合并功能十分强大。

    图片 25

    在线演示        源码下载

    8、HTML5/CSS3悬浮按钮特效 Canvas彩球飞舞效果

    这次要分享一个非常具有动画色彩的CSS3按钮,按钮的外观比较一般,但它有两个特别的地方:一、按钮悬浮,整个按钮看上去像是悬浮在半空中一样,很立体;二、点击按钮时利用HTML5 Canvas绘制彩球飞舞的效果,非常炫酷。

    图片 26

    在线演示        源码下载

    以上就是8款很给力的HTML5/CSS3应用插件,非常不错。(www.html5tricks.com)

    本文由html5tricks收集整理,转载请务必保留原文链接

    HTML5/CSS3提示框Tooltip动画

    一款基于CSS3的Tooltip工具,带有淡入淡出动画。

    核心CSS代码:

    图片 27图片 28

    .tooltip p { font-family: sans-serif;               font-size:14px;    font-weight:300;}    .tooltip { width:120px;             padding:10px;             border-radius:3px;             position:absolute;             box-shadow:1px 1px 10px 0 #ccc;             margin: -500px 0 0 -20px;             background:#fff;             -webkit-transition:margin .5s ease-in-out;            -moz-transition:margin .5s ease-in-out;}    .item:hover  {  background:#6d643b;}    .item:hover .tooltip {             margin:-145px 0 0 -20px;             -webkit-transition: margin .15s ease-in-out;    -moz-transition: margin .15s ease-in-out;}    .arrow {    position:absolute;    margin:10px 0 0 50px;      width: 0;       height: 0;       border-left: 10px solid transparent;      border-right: 10px solid transparent;      border-top: 10px solid #fff;  }
    

    View Code

    图片 29

    在线演示        源码下载

    HTML5/CSS3图片分割遮罩滑块动画

    该应用可以将任意元素遮盖在图片上方,并且指定遮住的部分。

    核心jQuery代码:

    图片 30图片 31

    (function($){  $(function(){        $('.code-wrapper').on( "mousemove", function(e) {        var offsets = $(this).offset();        var fullWidth = $(this).width();        var mouseX = e.pageX - offsets.left;          if (mouseX < 0) { mouseX = 0; }        else if (mouseX > fullWidth) { mouseX = fullWidth }            $(this).parent().find('.divider-bar').css({          left: mouseX,          transition: 'none'        });        $(this).find('.design-wrapper').css({          transform: 'translateX(' + (mouseX) + 'px)',          transition: 'none'        });        $(this).find('.design-image').css({          transform: 'translateX(' + (-1*mouseX) + 'px)',          transition: 'none'        });      });      $('.divider-wrapper').on( "mouseleave", function() {        $(this).parent().find('.divider-bar').css({          left: '50%',          transition: 'all .3s'        });        $(this).find('.design-wrapper').css({          transform: 'translateX(50%)',          transition: 'all .3s'        });        $(this).find('.design-image').css({          transform: 'translateX(-50%)',          transition: 'all .3s'        });      });      }); // end of document ready  })(jQuery);
    

    View Code

    图片 32

    在线演示        源码下载


    本文由威尼斯手机平台登陆发布于威尼斯登录首页,转载请注明出处:明日大家要享受的有个别使用就是借助HTML5和jQuery的,付费投稿布署

    关键词: