当前位置:首页 > 代码 > 正文

jQuery3D旋转图片相册代码(html3d旋转相册代码)

admin 发布:2022-12-19 18:20 174


今天给各位分享jQuery3D旋转图片相册代码的知识,其中也会对html3d旋转相册代码进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

怎么用jquery实现图片或者div自动3d翻转

JQ我以前好像在哪看到过案例,但忘了找不到了。Swiper可以,轻量级插件,功能却很强大,移动PC都能用。

html旋转相册代码

旋转index文件代码:

3D旋转相册

*{

padding:0;

margin:0;

}

body,

html{

height:100%;

}

/*背景图片在这里设置*/

body{

background-image:url("images/beijing.jpg");

background-size:100%100%;

}

#box{

width:280px;

height:400px;

position:fixed;

left:0;

right:0;

top:0;

bottom:0;

margin:auto;

transform-style:preserve-3d;

transform:rotateX(0deg)rotateY(0deg);

animation:go45slinearinfinite;

}

#boximg{

width:280px;

height:400px;

position:absolute;

left:0;

top:0;

}

#boximg:nth-child(1){

transform:rotateY(0deg)translateZ(650px);

}

#boximg:nth-child(2){

transform:rotateY(36deg)translateZ(650px);

}

#boximg:nth-child(3){

transform:rotateY(72deg)translateZ(650px);

}

#boximg:nth-child(4){

transform:rotateY(108deg)translateZ(650px);

}

#boximg:nth-child(5){

transform:rotateY(144deg)translateZ(650px);

}

#boximg:nth-child(6){

transform:rotateY(180deg)translateZ(650px);

}

#boximg:nth-child(7){

transform:rotateY(216deg)translateZ(650px);

}

#boximg:nth-child(8){

transform:rotateY(252deg)translateZ(650px);

}

#boximg:nth-child(9){

transform:rotateY(288deg)translateZ(650px);

}

#boximg:nth-child(10){

transform:rotateY(324deg)translateZ(650px);

}

@keyframesgo{

0%{

transform:rotateX(0deg)rotateY(0deg);

}

25%{

transform:rotateX(20deg)rotateY(180deg);

}

50%{

transform:rotateX(0deg)rotateY(360deg);

}

75%{

transform:rotateX(-20deg)rotateY(540deg);

}

100%{

transform:rotateX(0deg)rotateY(720deg);

}

}

jquery 让图片旋转30度怎么写啊

用jquery 给图片添加css样式,用css样式来控制旋转:

CSS3 transform 属性

transform具体的用法去百度吧 ,手册里解释很全面

html5 3d旋转相册代码怎么用

以下是代码:

!DOCTYPE html

html

head

titletransform-style实现Div的3D旋转-柯乐义/title

style

*{font-size: 24px;color: #00ff00; padding:0; margin:0;}

#container {

position: relative;

height: 300px;

width: 300px;

-webkit-perspective: 500;

margin-top: 200px;

margin-right: auto;

margin-left: auto;

}

#parent-keleyi-com {

margin: 10px;

width: 280px;

height: 280px;

background-color: #666;

opacity: 0.3;

-webkit-transform-style: preserve-3d;

-webkit-animation: spin 15s infinite linear;

}

#parent-keleyi-com div {

position: absolute;

top: 40px;

left: 40px;

width: 280px;

height: 200px;

padding: 10px;

-webkit-box-sizing: border-box;

}

#parent-keleyi-com :first-child {

background-color: #000;

-webkit-transform: translateZ(-100px) rotateY(45deg);

}

#parent-keleyi-com :last-child {

background-color: #333;

-webkit-transform: translateZ(50px) rotateX(20deg);

-webkit-transform-origin: 50% top;

}

/*执行Y轴旋转360度动画*/

@-webkit-keyframes spin {

from {-webkit-transform: rotateY(0);}

to {-webkit-transform: rotateY(360deg);}

}

/style

/head

body

div请使用支持CSS3的浏览器a href="" target="_blank"原文/a/div

div id="container"

div id="parent-keleyi-com"

diva href="/"柯乐义/a/div

diva href="/"keleyi.com/a/div

/div

/div

/body

/html

我想用jquery实现一个图片旋转,写了下面的简单代码,哪里不对啊?

你没有引入jq插件。

jq本身没有rotate方法,,你要引入jquery.rotate.min.js

js或jQuery实习图片以中心360度的旋转特效

这是CSS3里面的属性,

以中心为圆点旋转:transform-origin:center 0px;

旋转角度:transform:rotate(360deg);

顺时针旋转角度;

旋转角度可以写在js代码里,点击旋转或者加载页面旋转.都行

关于jQuery3D旋转图片相册代码和html3d旋转相册代码的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/17147.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载