The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Changing hover effect

View previous topic View next topic Go down

Solved Changing hover effect

Post by Guest on July 8th 2015, 8:43 pm

Hello,
I'd like to change the hover effect of my nav bar. Currently a line comes up, but I'd like it to be like the "overline from left" on this site: http://ianlunn.github.io/Hover/ , but with color yellow (# fbcb43). Very Happy

Aaand could the "Bounce to Bottom" effect be applied for the other buttons, like "New topic" "Post" etc.? Very Happy


I hope it's possible.
Thanks in advance! Mr. Green


Spoiler:

Code:
Link: http://www.tophun.net/
version: punbb



Last edited by Diana on July 9th 2015, 2:28 pm; edited 1 time in total

Guest
Guest


Back to top Go down

Solved Re: Changing hover effect

Post by Ange Tuteur on July 8th 2015, 10:29 pm

Hi @Diana,

For the "Overline from left" add this rule to your stylesheet :
Code:
nav .center_nav li a {
  border:none;
  position:relative;
}

nav .center_nav li a:before, nav .center_nav li a::before {
  content:".";
  background:#FBCB43;
  font-size:0;
  height:3px;
  position:absolute;
  top:0;
  left:0;
  right:100%;
  transition:300ms;
}

nav .center_nav li.active a:before, nav .center_nav li.active a::before { right:0 }
nav .center_nav li a:hover:before, nav .center_nav li a:hover::before { right:0 }

For the bounce to bottom on the buttons, use this CSS :
Code:
.button {
  overflow:hidden;
}
.button.flat { box-shadow:none !important; }

/* Bounce To Bottom */
.button {
  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;
  position: relative;
  -webkit-transition-property: color;
  transition-property: color;
  -webkit-transition-duration: 0.5s;
  transition-duration: 0.5s;
}
.button:before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fbcb43;
  -webkit-transform: scaleY(0);
  transform: scaleY(0);
  -webkit-transform-origin: 50% 0;
  transform-origin: 50% 0;
  -webkit-transition-property: transform;
  transition-property: transform;
  -webkit-transition-duration: 0.5s;
  transition-duration: 0.5s;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
}
.button:hover, .button:focus, .button:active {
  color: white;
}
.button:hover:before, .button:focus:before, .button:active:before {
  -webkit-transform: scaleY(1);
  transform: scaleY(1);
  -webkit-transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);
  transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);
}
( I used the same color as the navigation border, so you might want to change that )

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Changing hover effect

Post by Guest on July 9th 2015, 2:27 pm

Wow, perfect! Thank you very much!!! Mr. Green

Guest
Guest


Back to top Go down

Solved Re: Changing hover effect

Post by Ange Tuteur on July 9th 2015, 2:30 pm

You're welcome ^^

Topic archived

Have a great day.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum