Giter Site home page Giter Site logo

colorful.js's Introduction

colorful.js

让HTML元素具有自定义的颜色变幻背景

v0.3.0

author by So Aanyip

	colorful.js可以通过用户自定义关键帧的颜色,通过css3的transition实现颜色渐变功能。在低版本浏览器会通过javascript来实现。

	最简单用法:
	startLoop(document.getElementById('page'));


	function startLoop(element,array,msec,attr)
	@param  {HTMLElement} element 接受变色的元素
	@param  {array} array   变色依赖的关键颜色的二维数组,按rgb传入,ex: [[255,255,0],[0,220,220],[220,0,220]]	
	@param  {number} msec    完成一个变色阶段的时间(毫秒),即从array[i]变色到array[i+1]的时间。为了避免
	                         闪烁伤害眼睛,msec不能小于400
	@param  {string} attr   如果要变色的是css的其他属性,传入属性的名字,如'color'

colorful.js's People

Contributors

soaanyip avatar

Stargazers

Phan avatar  avatar HJM avatar May3 avatar  avatar blair avatar  avatar  avatar Zhaodong Xie avatar Louie Liu avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.