css3相册图片3D旋转展示特效_html/css_WEB-ITnose
查看效果:http://hovertree.com/texiao/css/14/
本效果用css3的animation实现动画
定义和用法
animation 属性是一个简写属性,用于设置六个动画属性:
animation-name
animation-duration
animation-timing-function
animation-delay
animation-iteration-count
animation-direction
注释:请始终规定 animation-duration 属性,否则时长为 0,就不会播放动画了。
默认值: none 0 ease 0 1 normal
继承性: no
版本: CSS3
JavaScript 语法: object.style.animation="movehovertree 5s infinite"
语法
animation: name duration timing-function delay iteration-count direction;
animation-name 规定需要绑定到选择器的 keyframe 名称。。
animation-duration 规定完成动画所花费的时间,以秒或毫秒计。
animation-timing-function 规定动画的速度曲线。
animation-delay 规定在动画开始之前的延迟。
animation-iteration-count 规定动画应该播放的次数。
animation-direction 规定是否应该轮流反向播放动画。
示例:http://hovertree.com/texiao/css/14/1.htm
图片旋转代码如下:
<!doctype html><html><head><meta charset="utf-8" /><title>CSS3女神来袭 - 何问起</title><style>body {margin: 0;background: #000;}#wrap {width: 300px;height: 400px;position: relative;margin: 100px auto;-webkit-perspective: 3000px;-moz-perspective: 3000px;-ms-transform: perspective(3000px);-ms-perspective: 3000px;}#head {width: 100%;height: 100%;position: absolute;-webkit-transform-style: preserve-3d;-webkit-animation: donghua 15s linear 0s infinite;-moz-transform-style: preserve-3d;-moz-animation: donghua 15s linear 0s infinite;-ms-transform-style: preserve-3d;-ms-animation: donghua 25s linear 0s infinite;}#head div {position: absolute;top: 0;left: 0;width: 300px;height: 400px;border: 1px solid red;text-align: center;line-height: 100px;}#head div:nth-child(1) {-webkit-transform: rotateY(0deg) translateZ(400px);-moz-transform: rotateY(0deg) translateZ(400px);-ms-transform: rotateY(0deg) translateZ(400px);background: url(http://hovertree.com/texiao/css/14/hovertreepic/01.jpg);background-size: cover;}#head div:nth-child(2) {-webkit-transform: rotateY(36deg) translateZ(500px);-moz-transform: rotateY(36deg) translateZ(500px);-ms-transform: rotateY(36deg) translateZ(500px);background: url(http://hovertree.com/texiao/css/14/hovertreepic/02.jpg);background-size: cover;}#head div:nth-child(3) {-webkit-transform: rotateY(72deg) translateZ(400px);-moz-transform: rotateY(72deg) translateZ(400px);-ms-transform: rotateY(72deg) translateZ(400px);background: url(http://cms.hovertree.com/hvtimg/201511/9rour12a.jpg);background-size: cover;}#head div:nth-child(4) {-webkit-transform: rotateY(108deg) translateZ(500px);-moz-transform: rotateY(108deg) translateZ(500px);-ms-transform: rotateY(108deg) translateZ(500px);background: url(http://hovertree.com/texiao/css/14/hovertreepic/04.jpg);background-size: cover;}#head div:nth-child(5) {-webkit-transform: rotateY(144deg) translateZ(400px);-moz-transform: rotateY(144deg) translateZ(400px);-ms-transform: rotateY(144deg) translateZ(400px);background: url(http://hovertree.com/texiao/css/14/hovertreepic/05.jpg);background-size: cover;}#head div:nth-child(6) {-webkit-transform: rotateY(180deg) translateZ(500px);-moz-transform: rotateY(180deg) translateZ(500px);-ms-transform: rotateY(180deg) translateZ(500px);background: url(http://hovertree.com/texiao/css/14/hovertreepic/06.jpg);background-size: cover;}#head div:nth-child(7) {-webkit-transform: rotateY(216deg) translateZ(400px);-moz-transform: rotateY(216deg) translateZ(400px);-ms-transform: rotateY(216deg) translateZ(400px);background: url(http://hovertree.com/texiao/css/14/hovertreepic/07.jpg);background-size: cover;}#head div:nth-child(8) {-webkit-transform: rotateY(252deg) translateZ(500px);-moz-transform: rotateY(252deg) translateZ(500px);-ms-transform: rotateY(252deg) translateZ(500px);background: url(http://hovertree.com/texiao/css/14/hovertreepic/08.jpg);background-size: cover;}#head div:nth-child(9) {-webkit-transform: rotateY(288deg) translateZ(400px);-moz-transform: rotateY(288deg) translateZ(400px);-ms-transform: rotateY(288deg) translateZ(400px);background: url(http://hovertree.com/hvtimg/201511/6j9j6tk5.png);background-size: cover;}#head div:nth-child(10) {-webkit-transform: rotateY(324deg) translateZ(500px);-moz-transform: rotateY(324deg) translateZ(500px);-ms-transform: rotateY(324deg) translateZ(500px);background: url(http://cms.hovertree.com/hvtimg/201512/wfevf6yh.jpg);background-size: cover;}@-webkit-keyframes donghua {0% {transform: rotateX(5deg) rotateY(360deg);}50% {transform: rotateX(-5deg) rotateY(180deg);}100% {transform: rotateX(5deg) rotateY(0deg);}}@-moz-keyframes donghua {0% {transform: rotateY(10deg) rotateY(0deg);}50% {transform: rotateY(-10deg) rotateY(180deg);}100% {transform: rotateY(10deg) rotateY(360deg);}}@-ms-keyframes donghua {0% {transform: rotateY(10deg) rotateY(0deg);}50% {transform: rotateY(-10deg) rotateY(180deg);}100% {transform: rotateY(10deg) rotateY(360deg);}}a{color:white}</style></head><body><div id="wrap"><div id="head"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div><div style="margin:0px auto;text-align:center;width:736px"><h2 id="图片立体旋转">图片立体旋转</h2><a href="http://hovertree.com/">首页</a> <a href="http://hovertree.com/texiao/">特效</a><a href="http://hovertree.com/h/bjaf/a6598spx.htm">原文</a> <a href="http://hovertree.com/texiao/css/14/1.htm">Demo 2</a></div></body></html>
更多:

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











이 기사는 HTML & lt; Progress & Gt에 대해 설명합니다. 요소, 그 목적, 스타일 및 & lt; meter & gt의 차이; 요소. 주요 초점은 & lt; progress & gt; 작업 완료 및 & lt; meter & gt; Stati의 경우

이 기사는 HTML & LT; Datalist & GT에 대해 논의합니다. 자동 완성 제안을 제공하고, 사용자 경험을 향상시키고, 오류를 줄임으로써 양식을 향상시키는 요소. 문자 수 : 159

기사는 HTML5 크로스 브라우저 호환성을 보장하기위한 모범 사례에 대해 논의하고 기능 감지, 점진적 향상 및 테스트 방법에 중점을 둡니다.

이 기사는 HTML & lt; meter & gt에 대해 설명합니다. 범위 내에 스칼라 또는 분수 값을 표시하는 데 사용되는 요소 및 웹 개발의 일반적인 응용 프로그램. & lt; meter & gt; & lt; Progress & Gt; 그리고 Ex

이 기사는 html5 & lt; time & gt; 시맨틱 날짜/시간 표현 요소. 인간이 읽을 수있는 텍스트와 함께 기계 가독성 (ISO 8601 형식)에 대한 DateTime 속성의 중요성을 강조하여 Accessibilit를 향상시킵니다.

이 기사에서는 브라우저에서 직접 사용자 입력을 검증하기 위해 필요한, Pattern, Min, Max 및 Length 한계와 같은 HTML5 양식 검증 속성을 사용하는 것에 대해 설명합니다.

이 기사는 모바일 장치의 반응 형 웹 디자인에 필수적인 Viewport Meta Tag에 대해 설명합니다. 적절한 사용이 최적의 컨텐츠 스케일링 및 사용자 상호 작용을 보장하는 방법을 설명하는 반면, 오용은 설계 및 접근성 문제로 이어질 수 있습니다.

이 기사는 & lt; iframe & gt; 외부 컨텐츠를 웹 페이지, 공통 용도, 보안 위험 및 객체 태그 및 API와 같은 대안을 포함시키는 태그의 목적.
