Skip to content

Instantly share code, notes, and snippets.

@Hikari9
Created February 6, 2016 13:08
Show Gist options
  • Save Hikari9/bad415f96c4dfc8ee51e to your computer and use it in GitHub Desktop.
Save Hikari9/bad415f96c4dfc8ee51e to your computer and use it in GitHub Desktop.
Hover float CSS script. TODO: hover-float-down, hover-float-right.
.hover-float {
margin-top: 10px !important;
margin-bottom: 0px !important;
}
.hover-float:hover {
margin-top: 0px !important;
margin-bottom: 10px !important;
}
.hover-float-child > * {
margin-top: 10px !important;
margin-bottom: 0px !important;
}
.hover-float-child:hover > * {
margin-top: 0px !important;
margin-bottom: 10px !important;
}
.hover-float-left {
margin-left: 10px !important;
margin-right: 0px !important;
}
.hover-float-left:hover {
margin-left: 0px !important;
margin-right: 10px !important;
}
.hover-float-left-child > * {
margin-left: 10px !important;
margin-right: 0px !important;
}
.hover-float-left-child:hover > * {
margin-left: 0px !important;
margin-right: 10px !important;
}
.hover-float,
.hover-float-child,
.hover-float-left,
.hover-float-left-child,
.hover-float:hover,
.hover-float-child:hover,
.hover-float-left:hover,
.hover-float-left-child:hover {
-webkit-transition: 0.3s ease;
-ms-transtion: 0.3s ease;
transition: 0.3s ease;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment