Git Product home page Git Product logo

ianlunn / hover Goto Github PK

View Code? Open in Web Editor NEW
29.1K 29.1K 5.8K 994 KB

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

Home Page: http://ianlunn.github.io/Hover/

License: Other

JavaScript 1.09% CSS 4.95% HTML 10.14% Less 40.21% SCSS 43.62%
css css-effects sass

hover's Introduction

Ian Lunn - Front-end Developer

Hi, I’m Ian. I create successful websites that are fast, easy to use, and built with best practices.

Some of my popular GitHub repos:

You can also check out my portfolio here:

I'm open to job opportunities and freelance work. Get in touch

hover's People

Contributors

benbayard avatar colbyfayock avatar dusandinho avatar fay-jai avatar gitter-badger avatar ianlunn avatar jamesgoldswain avatar jaspur avatar joseluis avatar kvnxdev avatar leandono avatar machou avatar marcobiedermann avatar mdavis1982 avatar minimalistic avatar mohannadnaj avatar ratbeard avatar xyzhanjiang avatar zachlatta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hover's Issues

Add flip effects

So I was going through this post on David Walsh's blog, about horizontal and vertical flip effects in CSS3 and thought it'd make for a nice addition to this library. I can take this over the coming weekend.

Let me know what you think!

Scss version doesn't include webkit/moz versions??

Am I missing something?

The hover.css version includes the webkit/moz calls, though the scss version doesn't? Is there a scss version I can't see?

It would be so useful to use includes on elements rather than adding a class in my markup.

Remove button class from main Sass file.

The file scss/hover.scss contains a class specific for your site, e.g.:

.button {
    @include button();
}

Please, move this to the html file or an other Sass file, because this inclusion makes it more difficult to integrate Hover into my own project.

use a lot more variables in Sass/LESS

I've been playing with the project, great work so far.

Overriding the built in options is really painful as I have to have a second sheet that I've written out just to override all of the options within the framework.

Example:

.icon-float-away(){
  ... some stuff ...
  &:before,
  &:after {
    content: "\f055";
    position: absolute;
    right: 1em;

It would be great if you moved these options to a variables.less file (which is common in LESS projects) so they could be overridden. The update would look something like:

.icon-float-away(){
  ... some stuff ...
  &:before,
  &:after {
    content: @hvr-icon-float-away;
    position: absolute;
    right: @hvr-icon-right-position;

That way in a single file I just change:

@hvr-icon-right-position: 1em;

to

@hvr-icon-right-position: 2em; (or whatever value)

without a lot of work.

Decouple FontAwesome?

I have my own web font, and it would be really awesome if I can just throw these classes on to my existing icons and have the effects added to it.

PHP Support

How do I use it with PHP ? I did everything as mentioned in the tutorial, but it doesn't work.

Namespace the CSS classes

It would be nice to namespace the CSS classes to make hover not interfere with existing libraries/code.

Something like hover-grow ?

2D transforms not working in IE11 / Windows 10

I put a hover effect on the nav menu on my site and it works in Chrome & FF but not in IE. Just in case it makes a difference, I also have a CSS animation effect on another element, plus a jQuery animation effect which is on the same element as the CSS one, but it's a different element to the one the hover effect is on.

I tried adding the -ms- prefix to all the transform and animation attributes to all the lines of the hover CSS, so now they all have the basic transform or animation attribute as well as the webkit prefix and the -ms-prefix. I even tried putting them in the correct order (not that it matters) but it's not going.

Are there any known issues that could be causing this?

Bubbles in Safari broken

In safari 5.1.7 the bubble effects dont work - and it makes all the text on the page a weird color/weird anti-alias/ unreadable.

Forward & Backward Effects

I'm not sure why these basic ones weren't included but here's some code to add to the collection:

/* Forward */
.hvr-forward {
  display: inline-block;
  vertical-align: middle;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -moz-osx-font-smoothing: grayscale;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-property: transform;
  transition-property: transform;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
}
.hvr-forward:hover, .hvr-forward:focus, .hvr-forward:active {
  -webkit-transform: translateX(8px);
  transform: translateX(8px);
}

/* Backward */
.hvr-backward {
  display: inline-block;
  vertical-align: middle;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -moz-osx-font-smoothing: grayscale;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-property: transform;
  transition-property: transform;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
}
.hvr-backward:hover, .hvr-backward:focus, .hvr-backward:active {
  -webkit-transform: translateX(-8px);
  transform: translateX(-8px);
}

Animation doesn't play after link is clicked.

I am using the "ripple out" effect for some links. The links are set to open in a new window/tab. What is happening is that after someone clicks the link, a new tab is opened, but if you go back to the original page, the animation no longer plays for the link you just clicked on, until you refresh the page.

How can I fix that, so that the animation always plays?

hvr-border-fade issue

Having a slight issue with hvr-border-fade as it doesn't seem to be on top of the image even tho Im using z-index 1;

you can see a faint blue shadow round the box but its not on top of the image, any ideas ?

screen shot 2016-01-28 at 4 08 57 pm

Change position of FontAwesome icons

Hi beautiful script! Thank you!

I'm using fontAwesome icons on my site + I'm using hover.css.

Now if you navigate to my website: www.jedanaest.com.hr and scroll all the way down to the footer area, you will see a contact widget with super cool icons that are animated on hover.

The only problem I have is that I want the icon to be first i.e. on the left, and then text.

Is this something I need to do with CSS or is it a HTML problem? The problem does not persist if I use a non-icon animation, but the bot text and icon animate.

Thanks!

LESS Support

Hi,
Thanks for wonderful helper. So, I realize that LESS support has not been provided yet. Is it on the roadmap? Otherwise, I would like to start LESS support for Hover.

Any way of getting IE8 to fallback nicely to simple hover?

I'm using bootstrap 3 and your nice background transitions like bounce-to-right.

However no matter what I try I cannot get simple hover (bg color change) working in IE8. In IE8 the button is rendered in non-hover state with the darker hover color I've set up.

Has anyone had similar issue and found a work around?

Demo?

I what a demo...plezz.

font-weight changes

When I add the class "hvr-underline-reveal" to a link the font-weight changes.
Any idea how to resolve this?

missing release tags;

Hi,
i'm trying to include Hover into my bower.json, but after running bower install i got error message "No tag found that was able to satisfy 1.0.8".

Currently i'm using latest commit id in my bower.json as workaround, but this makes difficult to check is there any newer version and how much has changed since latest release;

Is it possible to add release tags with versions?

ps: I used VersionEye to lookup version numbers for this package;

Add pop-out effects

Hey! I created a flat shadow pop out effect that I think would be a nice addition to your library. You can check out my code here :http://jsfiddle.net/Lumz96ex/5/ . I'm new to Github and decided to explore CSS related repositories since CSS and HTML are my strong suit. Let me know what you think.

Replicating the styling to a button

btn
My button looks weird. The css is:

.login-btn{
margin: .4em;
padding: 1em;
cursor: pointer;
background: #e1e1e1;
text-decoration: none;
color: #666;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}

hvr-grow hover.

Hello, I have a question about this element, more precise about aligning. I have a series of elements who are forming a circle in mine div, this is the example http://dabblet.com/gist/3864650.
I want to use grow hover on all buttons, and I have done all the tutorial said, been using hover-min.css, but when I use it, the property align all icons in the middle, I have tried and put 'vertical-align:none' but that did not do the trick.
How can I over come this.
Tank you.

ff issue

i think your css work here is great. but i've found (what i think, is hover specific) issue http://acornfencingandconcrete.co.uk/ makes fair use of your hover.css BUT in the top right i have three buttons that are NOT responding in firefox.

im assuming this is an issue on the actual hover action as there is also a hover "email us" button on the carousel that is unresponsive too.

excuse the carousel location, currently fixing [renders off screen (right)]

Some effects snap into place in Chrome v33

Since Opera v20 and Chrome v33, elements that have both a transition and animation applied may snap into place when hovered over.

Unfortunately this is a browser bug and nothing can be done about it in the Hover.css library. A transition will not take affect when an animation is applied as well.

Bug reported here: https://code.google.com/p/chromium/issues/detail?id=347993&thanks=347993&ts=1393600890

Example of the issue here: http://codepen.io/IanLunn/pen/noxIf

Hopefully this will be fixed in a not too distant version of Chrome

generator

I think that to make a CSS generator, where you can select only the desired animation would be a good idea. Often, you need only a few animations of the entire list, and pull out all the CSS for this is somehow not good.

I could help you in this.

Applying styles to submit input button

Hi there,

Great project, love it!!

I was wondering, can we somehow apply the styles to an submit - input field ?

(I know it will work using but, is there a way to use it with the input field?)

Hover effects break the <tr> tags

I'm using the hover.css effects with bootstrap just like this:

`

` tag properties: ` tr { display: table-row; vertical-align: inherit; border-color: inherit; } `

.hover tag properties:
.hover-shadow { display: inline-block; position: relative; -webkit-transition-duration: .3s; transition-duration: .3s; -webkit-transition-property: transform; transition-property: transform; -webkit-transform: translateZ(0); transform: translateZ(0); box-shadow: 0 0 1px rgba(0,0,0,0); }

and the display property breaks making the tag shrink.
Is there any way to adjust display properties, so that and hover styling work together without breaking .

Undesired behavior with a few effects in Firefox 26.0

Firefox 26.0 Windows
On your demo page the following effects exhibit extreme "jitters":
*Bubble Float Left/Right/Top/Bottom
*Outline Inward

How to reproduce: on any of the speech bubble ones just move the cursor to roughly where the :before arrow and the box slide apart, what will happen is that the animation will happen, and the cursor will change from the hand back to arrow, animation will start to slide back in and get re-triggered non stop making the animation stutter and the cursor flip between arrow/hand non stop until you move away. With Outline Inward, if the cursor is roughly where the outline first appears when the animation starts, same idea

I've tested with Firefox 26.0, Chrome 32.0.1700.76 m and IE11, and Firefox is the only one where it can get "caught" in the animation

Nice collection of effects overall!

Inconsistent text rendering and position

On hovering the 'Bounce In' button I noticed that the text goes down and up at the end of the animation.

What can be the cause?

Firefox - 40.0.2
OSX Yosemite - 10.10.4

Hover effect still carries on after following link.

Hi, great plugin, thanks for all the work.

I have a problem when using images from other domains, such as:
Built with Grunt

I apply a hover effect to that, follow the link which opens in a new window, but the only problem is that the 'Built with Grunt' icon carries on with the hover effect until I click somewhere else on the page.

It only happens to images/icons pulled from other domains, not ones on my domain.

Can you suggest some Javascript to eliminate this behaviour please, or point me in the right direction for being a moron.

Thank you.

Border CSS elements on mobile - Small screens

For the Border effects, Something I have dealt with but is an issue..

When you have a hvr-outline-in for example on an image/link and your on say bootstrap and scale down or on mobile you get a little horizontal scroll because of the CSS this adds in.

How use less

Hi,
I have a project with less and Bootstrap.
How replace Sass by Less.

Thanks

PS: I never used Sass

Make it accessible

While your intent was to create hover effects, it only takes a bit more work to make this work for all users. Currently, this provides no feedback for someone using a keyboard to move throughout the page.
Here are the two steps needed to make this keyboard accessible.

  1. place an href on your examples. A link without an href is an anchor and does not receive keyboard focus. So simply add href="#" to your examples. This will also re-enforce best practices.
  2. add :focus to your styles. This is super easy with SASS. a:hover, a:focus. You could also add :active to make it work with older versions of IE.
    These are small changes, but will greatly increase the accessibility of projects for people that copy/paste your code.
    thank you for putting together these examples.

Include keyframes in mixins (scss)

Think it would be great if the keyframes directives are included in the mixins.

@mixin pulse {
  @at-root {
    @include keyframes( #{$nameSpace}-pulse ) {
      // ...
    }
  }

 @include hacks();

  // ...
}

For individual usage a _hover.scss partial would be nice to prevent Copy&Paste actions.

README Examples

I think a few demos or examples in the README would be a real benefit. I saw the project in the github daily digest and wanted to check it out, but don't have time for a sample implementation right at the moment.

Add credits to README

It would be nice to add the names of all contributors to the README.

Would that be a possibility?

W3 validation of the “Bubble” effect.

I have been working on a small web-site and played around with the “Bubble” effect. I wanted to validate it so I used the validator from W3. Basically, what I found is that the pointer-event declaration is unnecessary. And whenever you use calc(% - px) there is an invalid value alert. It works just as fine with only just a value in pixel. So if validation matters to you, this is what I found thus far. I'll make sure to credit you later on my webpage. Thank you.

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.