Button Effect
Button Effect
I came across a help site containing buttons that pop forward when you hover over them. Is it an effect that can be achieved through the stylesheet? If so, may I ask what properties are involved? I've searched the forum but haven't had any luck. Perhaps I'm using the wrong search terms. Thanks.
-
- Senior Propellus Maximus
- Posts: 2089
- Joined: Tue Mar 07, 2006 5:06 pm
- Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
- Contact:
Re: Button Effect
I'm guessing the site has a mouse over script that changes the button image to create the impression of movement. Used to be a feature in DreamWeaver...
Try this
Try this
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Re: Button Effect
You could probably get mostly what you want using CSS, but you might have to do it in a text editor. I'm not sure exactly what's available in the Flare editor.
e.g.
https://resource-centre.net/css3-tutori ... o-buttons/
e.g.
https://resource-centre.net/css3-tutori ... o-buttons/
-
- Senior Propellus Maximus
- Posts: 2089
- Joined: Tue Mar 07, 2006 5:06 pm
- Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
- Contact:
Re: Button Effect
Neat, although you can get a better effect with the images hack...Psider wrote:You could probably get mostly what you want using CSS, but you might have to do it in a text editor. I'm not sure exactly what's available in the Flare editor.
e.g.
https://resource-centre.net/css3-tutori ... o-buttons/
If you follow the page the screenshot of the code for animating the buttons is wrong, its a repeat of the preceding code. Downloading the zip file will give you the code you need for the style sheet.
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Re: Button Effect
It's fairly easy using CSS transitions.
https://www.w3schools.com/css/css3_transitions.asp
This simple example should give you an idea how it works - this transition works on the font size, but you could animate the position or pretty much any other attribute:
https://www.w3schools.com/css/css3_transitions.asp
This simple example should give you an idea how it works - this transition works on the font size, but you could animate the position or pretty much any other attribute:
Code: Select all
a.button-trans
{
font-size: 1em;
transition: font-size 0.5s;
border: 1px solid #000000;
padding: 0.5em;
}
a.button-trans:hover
{
font-size: 1.5em;
}
-
- Sr. Propeller Head
- Posts: 346
- Joined: Fri Nov 05, 2010 3:30 am
Re: Button Effect
Is this the sort of thing you mean?
If so - I achieved this using the MadCap Balboa template for html5 help
If so - I achieved this using the MadCap Balboa template for html5 help
You do not have the required permissions to view the files attached to this post.
Re: Button Effect
That's a CSS box shadow - it'd be pretty easy to set that on the :hover style.ajturnersurrey wrote:If so - I achieved this using the MadCap Balboa template for html5 help
https://www.w3schools.com/cssref/css3_pr_box-shadow.asp
Re: Button Effect
Yes, the example from the Balboa template is the kind of effect I'm looking for. We're using a different template, but following the responses here, I'll try to work up the same effect in ours. You've all been very helpful. Thank you.
Re: Button Effect
By the way, the directions in Dave's suggested link work nicely; they deliver the effect I'm after once the button has been rolled over. But is there a way in the stylesheet to create the animated effect of the button popping out as it's rolled over? I've tried applying the style to the hover class, and it comes close to the effect I'm after, but I'm missing something embarrassingly obvious, no doubt.
Re: Button Effect
The properties you want to animate need to be in the transition, e.g. if you wanted to animate a box shadow:jack16 wrote:By the way, the directions in Dave's suggested link work nicely; they deliver the effect I'm after once the button has been rolled over. But is there a way in the stylesheet to create the animated effect of the button popping out as it's rolled over? I've tried applying the style to the hover class, and it comes close to the effect I'm after, but I'm missing something embarrassingly obvious, no doubt.
Code: Select all
a.button-trans
{
border: 1px solid #000000;
transition: box-shadow 0.5s;
padding: 0.5em;
}
a.button-trans:hover
{
box-shadow: 5px 5px 5px #888888;
}
Re: Button Effect
You're a star, Dave. Thank you. Thanks to all you good people.