Code Monkey home page Code Monkey logo

hover's Introduction

#hover.css

A collection of CSS3 powered hover effects to be applied to call to actions, buttons, logos, featured images and so on. Easily apply to your own elements, modify or just use for inspiration. Available in CSS and SASS.

##Author

##How To Use hover.css can be used in a number of ways; either copy and paste the effect you'd like to use in your own stylesheet or reference the stylesheet. Then just add the class name of the effect to the element you'd like it applied to.

###Copy and Paste an Effect If you plan on only using one or several effects, it's better practice to copy and paste an effect into your own stylesheet, so a user doesn't have to download hover.css in its entirety.

Assuming you want to use the Grow effect:

  1. Download hover.css
  2. In hover.css, find the 'Grow' CSS (each effect is named using a comment above it):
/* Grow */

.grow {
  display: inline-block;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-property: -webkit-transform;
  transition-property: transform;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
}

.grow:hover {
  -webkit-transform: scale(1.1);
  -ms-transform: scale(1.1);
  transform: scale(1.1);
}
  1. Copy this effect and then paste it into your own stylesheet.
  2. In the HTML file which you'd like the effect to appear, add the class of .grow to your chosen element.

Example element before applying hover.css effect:

<a class="button">Add to Basket</a>

Example element after applying hover.css effect:

<a class="button grow">Add to Basket</a>

###Reference hover.css If you plan on using many of hover.css' effects on your website, you may like to reference the entire hover.css stylesheet.

  1. Download hover-min.css
  2. Add hover-min.css to your websites files, in a directory named css for example
  3. Reference hover-min.css in <head> of the HTML page you'd like to add hover.css effects to:
<head>
	<link href="css/hover-min.css" rel="stylesheet">
</head>
  1. Assuming you want to use the 'Grow' effect, in the HTML file you'd like to use this effect, add the class of .grow to your chosen element.

Example element before applying hover.css effect:

<a class="button">Add to Basket</a>

Example element after applying hover.css effect:

<a class="button grow">Add to Basket</a>

##License hover.css is open source, and made available under a MIT License. Distribute, use as-is, or modify to your liking in personal and commercial projects. Please retain the original readme and license files.

Placing author information in your stylesheet, credits page or humans.txt is much appreciated.

hover's People

Contributors

ianlunn avatar benbayard avatar leandono avatar

Watchers

James Cloos avatar Richard Duchatsch Johansen 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.