All Projects → elrumordelaluz → Csshake

elrumordelaluz / Csshake

Licence: mit
CSS classes to move your DOM!

Programming Languages

CSS
56736 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Csshake

Mq Scss
Extremely powerful Sass media query mixin. Allows you to create almost any media query you can imagine.
Stars: ✭ 122 (-97.31%)
Mutual labels:  mixins, sass
Interview Problem Summary
🎤 Prepare for the interviews and sum up the most popular interview problems for front-end(HTML/CSS/Javascript), Web development, full-stack. Also did some typical coding practice questions, such as UI caculator
Stars: ✭ 112 (-97.53%)
Mutual labels:  sass, dom
Angled Edges
📐 Quickly create angled section edges using only Sass
Stars: ✭ 969 (-78.61%)
Mutual labels:  mixins, sass
Mixins
sass mixins
Stars: ✭ 132 (-97.09%)
Mutual labels:  mixins, sass
Skeleton Sass
Skeleton Sass is a highly modular version of Skeleton CSS
Stars: ✭ 151 (-96.67%)
Mutual labels:  mixins, sass
Browser Hack Sass Mixins
Browser hack sass mixin - Apply your SCSS to a specific browser - CSS hacks for: IE, Chrome, Firefox, Edge, Opera
Stars: ✭ 170 (-96.25%)
Mutual labels:  mixins, sass
Sassessentials
Repository for my tutorial course: Sass Essential Training on LinkedIn Learning and Lynda.com.
Stars: ✭ 167 (-96.31%)
Mutual labels:  mixins, sass
Juice
Mixins for Life
Stars: ✭ 274 (-93.95%)
Mutual labels:  mixins, sass
Cc
一个基于angular5.0.0+ng-bootstrap1.0.0-beta.8+bootstrap4.0.0-beta.2+scss的后台管理系统界面(没基础的同学请先自学基础,谢谢!)
Stars: ✭ 416 (-90.82%)
Mutual labels:  sass
Lucia
🙋‍♀️ 3kb library for tiny web apps
Stars: ✭ 439 (-90.31%)
Mutual labels:  dom
Via.js
Write JS code that runs in a different context. E.g. use the DOM in a Web Worker.
Stars: ✭ 412 (-90.91%)
Mutual labels:  dom
Magento2 Frontools
Set of front-end tools for Magento 2 based on Gulp.js
Stars: ✭ 416 (-90.82%)
Mutual labels:  sass
Imba
🐤 The friendly full-stack language
Stars: ✭ 5,434 (+19.93%)
Mutual labels:  dom
Fontisto
The iconic font and CSS toolkit. Fontisto gives you scalable vector icons that can instantly be customized: size, color, drop shadow and anything that can be done with the power of CSS.
Stars: ✭ 413 (-90.89%)
Mutual labels:  sass
Progress Tracker
A HTML component to illustrate the steps in a multi step process e.g. a multi step form, a timeline or a quiz.
Stars: ✭ 461 (-89.83%)
Mutual labels:  sass
Wheels
以自己是否能造出轮子来衡量学习的效果
Stars: ✭ 406 (-91.04%)
Mutual labels:  dom
Pixel Bootstrap Ui Kit
Pixel UI - Free and open source Bootstrap 5 UI Kit without jQuery
Stars: ✭ 406 (-91.04%)
Mutual labels:  sass
Laravel Vue Boilerplate
🐘 A Laravel 6 SPA boilerplate with a users CRUD using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass, and Pug.
Stars: ✭ 472 (-89.58%)
Mutual labels:  sass
Ijk
Transforms arrays into virtual dom trees; a terse alternative to JSX and h
Stars: ✭ 452 (-90.02%)
Mutual labels:  dom
Jsdom Global
Enable DOM in Node.js
Stars: ✭ 431 (-90.49%)
Mutual labels:  dom

CSShake npm version

Some CSS classes to move your DOM!

Live Demo

Download Center

You could download the complete csshake.css file or separated files for each shake animation (i.e csshake-little.css). Each one expanded or minified.

Why

I had to do a 'shake-animation' for a big project. First, I did it in vanilla CSS. After finish it I discover this cool jQuery plugin by @jackrugile. Then I started to think in made this little CSS project

Install

Fork this repo

  $ git clone https://github.com/elrumordelaluz/csshake.git

or via Bower

  $ bower install csshake

or via npm

  $ npm i csshake

scripts

  $ npm run watch
  $ npm run build:raw
  $ npm run build:min

CDN

Now is also available in cdnjs for each shake animation: https://cdnjs.com/libraries/csshake

How to use

First include the CSS file

<link rel="stylesheet" type="text/css" href="csshake.css" />`

Then call the diffetent classes on the element you want to shake!

<div class="shake"></div>
<div class="shake shake-hard"></div>
<div class="shake shake-slow"></div>
<div class="shake shake-little"></div>
<div class="shake shake-horizontal"></div>
<div class="shake shake-vertical"></div>
<div class="shake shake-rotate"></div>
<div class="shake shake-opacity"></div>
<div class="shake shake-crazy"></div>

Add also classes to control the animation-play-state.

<!-- Freeze the animation at that point when :hover -->
<div class="shake shake-freeze"></div>
<!-- Continuous animation instead on :hover -->
<div class="shake shake-constant"></div>
<!-- and stop when :hover -->
<div class="shake shake-constant shake-constant--hover"></div>

Customize

You could customize the Sass @mixins to create new shaking animations, yeah! Editing the do-shake mixin in scss/_tools.scss file

.my-custom-shake {
  @include do-shake(
    $name: 'my-custom-shake',
    $h: 5px,
    $v: 5px,
    $r: 3deg,
    $dur: 100ms,
    $precision: 0.02,
    $opacity: false,
    $q: infinite,
    $t: ease-in-out,
    $delay: null,
    $chunk: 100%
  );
}

$name {String} is the name for the keyframes animation

$h {Number} is the max number for random to assign in x axis

$v {Number} is the max number for random to assign in y axis

$r {Number} is the max number for random rotation

$dur {Number} is the animation-duration time value

$precision {Number} is the precision of the keyframes animation. For example .02 generates keyframes each 2% and .1 each 10%. The calculation is $step: 100 * $precision;

$opacity {Boolean} to apply random animation also in the opacity property

$q {String} is the animation-iteration-count value

$t {String} animation-timing-function value

$delay {Number} animation-delay time value

$chunk {Number} is the part of the keyframes where apply the animation

Use with Webpack 2.x

When installed with npm, import csshake inside your css|stylus|sass files with ~ prefix to trigger webpack's module resolving:

@import '~csshake';

This will get you non-minified plain css.

Import source sass files

Include full path relative to your node_modules folder with csshake installation

@import '~csshake/scss/csshake-hard.scss';

=======

Changelog

v1.5.0 (October 5, 2015)

  • Improve the core mixin for a better output code
  • Generate the entire 'shake' animation from only one @mixin. Easier to cerate custom shakes animations classes.
  • Add a new argument to allow animate only part of the 100% of keyframes. Solves issue #25
  • Add a class to allow fire animation from a parent element. Solves issue #16
  • Update semanthics on modifiers classes
  • Export separated stylesheets for each animation. Solves issue #20

======

Made with by @elrumordelaluz using Sass.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].