CSS与SVG动画库:Animate Plus_html/css_WEB-ITnose

WBOY
풀어 주다: 2016-06-21 09:11:50
원래의
1517명이 탐색했습니다.

Animate Plus是一个高性能的 JavaScript 库,能够帮助你构建动画效果的CSS 属性和 SVG 属性Animate Plus 是非常适合快速 UI 交互的,同时也适合台式和移动设备上更长的动画序列。示例:

  • CSS spring animations on DOM elements
  • Simple SVG morphing animation
  • Performance/stress test (250 SVG shapes animated independently)

Getting Started

npm install animateplusor download and insertanimate.min.js(2.7KB gzipped) :

<script src=animate.min.js></script>
로그인 후 복사

Start animating things:

animate({  el: "div",  translateX: 100,  opacity: .5,  duration: 500 });
로그인 후 복사

API

Arguments

animateaccepts either anObjector aMapcontaining at least an element and a property to animate:

animate({  el: "div",  opacity: 0 }); // Or: var params = new Map();params.set("el", "div");params.set("opacity", 0);animate(params);
로그인 후 복사

el

The elements to animate.elcan either take a:

  • CSS selector:"div"
  • jQuery-like object:$("div")
  • DOM element:document.querySelector("div")
  • Array of DOM elements:[document.querySelector("div")]
  • NodeList or HTMLCollection:document.getElementsByTagName("div")

项目主页:http://www.open-open.com/lib/view/home/1434012030223

원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!