Skip to content

Commit

Permalink
Added description of referencing Hover.css via a CSS @import
Browse files Browse the repository at this point in the history
  • Loading branch information
IanLunn committed Jan 15, 2015
1 parent c723bd3 commit 2f38685
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A collection of CSS3 powered hover effects to be applied to links, buttons, logo
## 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
### A. 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 `css/hover.css` in its entirety.

Assuming you want to use the Grow effect:
Expand Down Expand Up @@ -58,7 +58,7 @@ Example element after applying Hover.css effect:

**Note**: As of `2.0.0` all Hover.css class names are prefixed with `hvr-` to prevent conflicts with other libraries/stylesheets. If using Sass/LESS, this can easily be changed using the `$nameSpace`/`@nameSpace` variable in `scss/_options.scss` or `less/_options.less`.

### Reference Hover.css
### B. Reference Hover.css

If you plan on using many Hover.css effects, you may like to reference the entire Hover.css stylesheet.

Expand All @@ -70,6 +70,10 @@ If you plan on using many Hover.css effects, you may like to reference the entir
<link href="css/hover-min.css" rel="stylesheet">
</head>
```
Alternatively you can add a reference into an existing stylesheet like so (this may be useful to WordPress users who are unable to edit HTML):
```css
@import url("hover-min.css");
```
4. Assuming you want to use the Grow effect, in the HTML file you'd like to use this effect, add the class of `.hvr-grow` to your chosen element.

Example element before applying Hover.css effect:
Expand Down

0 comments on commit 2f38685

Please sign in to comment.