jquery 图片360度旋转效果 您所在的位置:网站首页 jquery点击图片旋转怎么设置出来 jquery 图片360度旋转效果

jquery 图片360度旋转效果

2024-07-03 06:14| 来源: 网络整理| 查看: 265

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

其中js类库,图片都自己去找,不影响

index.html

jquery制作一个漂亮的手机软件        ;     ;                                                        

basic.css

@charset "utf-8"; /* reset */ body{font:12px/18px arial,sans-serif;color:#585858;} body,div,p,span,form,iframe,table,td,th,input,textarea,button,label,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6{margin:0;padding:0;} h1,h2,h3,h4,h5,h6{font-size:100%; } ul,ol,li,dl{list-style-type:none;} em,i,dfn,cite,strong,small{font-style:normal;}  img{border:0;} fieldset,button,input,select,option{vertical-align:middle;font:12px/18px arial,sans-serif;} table{border-collapse:collapse;border-spacing:0} textarea{resize:none} /* color */ a:link,a:visited{color:#575757;text-decoration:none;} a:hover{color:#ef4165;text-decoration:none;} a:active{color:#1d7400;} /* clearfix */ .clearfix{ *zoom:1;} .clearfix:after{display:table; line-height:0; content:""; clear:both;} /* public.omission */ .fl{ float:left;}            .fr{ float:right;}            .tc{ text-align:center;}      .tr{ text-align:right;}  .fb{ font-weight:bold;}      .f12{ font-size:12px;}        h3{ font-weight:normal;}      .listop{ padding-top:15px;} .mr10{ margin-right:10px;}   .mr15{ margin-right:15px;}    .mL10{ margin-left:10px;}     .mL15{ margin-left:15px;} .mt10{ margin-top:10px;}     .mt15{ margin-top:15px;}      .mb10{ margin-bottom:10px;}   .mb15{ margin-bottom:15px;} .weiduduan{ width:800px; margin:50px auto 0 auto;} #phoneCarousel{height:390px;margin:0 auto;position:relative;width:800px;} #phoneCarousel .arrow{width:44px;height:44px;background:url(../images/arrows.png) no-repeat;position:absolute;top:50%;margin-top:-22px;left:0;cursor:pointer;} #phoneCarousel .next{background-position:right top;left:auto;right:0;} #phoneCarousel .arrow:hover{background-position:left bottom;} #phoneCarousel .next:hover{background-position:right bottom;} #stage{left:50%;margin-left:-350px;position:absolute;width:700px;height:100%;} #stage img{display:none;} #stage .default{display:block;left:50%;margin-left:-135px;position:absolute;} #stage .animationReady{display:block;position:absolute;top:0;left:0;}

script.js

$(document).ready(function(){     var deg=0;     /* Storing all the images into a variable */     var images    = $('#stage img').removeClass('default').addClass('animationReady');     var dim        = { width:images.width(),height:images.height()};          var cnt = images.length;          /* Finding the centers of the animation container: */     var centerX = $('#stage').width()/2;     var centerY = $('#stage').height()/2 - dim.height/2;     function rotate(step,total){         // This function loops through all the phone images, and rotates them         // with "step" degrees (10 in this implementation) until total has reached 0              /* Increment the degrees: */         deg+=step;                  var eSin,eCos,newWidth,newHeight,q;                  /* Loop through all the images: */         for(var i=0;i


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有