ActionsDev

waltd

10 Nov 2020, 2:36 pm

Re: CTA button

Typo, corrected below:

On Nov 10, 2020, at 9:36 AM, Walter Lee Davis <email@hidden> wrote:

I would use custom CSS to do this. Make a background image “sprite” that has the two colors side-by-side. Set it as the background image for the button (which can be a transparent GIF image, a DIV, a button — anything that occupies space and can be wrapped in a link). Set a CSS transition on background-position, so the change from one color to the other happens gradually, and set the background position on the button at default to center right, and on hover to center left.

~~~~ #my_button { transition: background-position .75s; background-image: url(path/to/sprite.gif); background-position: center right; }

#my_button:hover {

background-position: center left; } ~~~

Walter

On Nov 10, 2020, at 3:10 AM, James702 via actionsdev <email@hidden> wrote:

Hello everyone! Anyone knows how to create a CTA button like this one? I want it to change the color when pointed?

https://ester.co

Freeway user since 1997

http://www.walterdavisstudio.com

waltd

10 Nov 2020, 2:39 pm

Typo, corrected below:

On Nov 10, 2020, at 9:36 AM, Walter Lee Davis <email@hidden> wrote:

I would use custom CSS to do this. Make a background image “sprite” that has the two colors side-by-side. Set it as the background image for the button (which can be a transparent GIF image, a DIV, a button — anything that occupies space and can be wrapped in a link). Set a CSS transition on background-position, so the change from one color to the other happens gradually, and set the background position on the button at default to center right, and on hover to center left.

~~~~ #my_button { transition: background-position .75s; background-image: url(path/to/sprite.gif); background-position: center right; }

#my_button:hover {

background-position: center left; } ~~~

Walter

On Nov 10, 2020, at 3:10 AM, James702 via actionsdev <email@hidden> wrote:

Hello everyone! Anyone knows how to create a CTA button like this one? I want it to change the color when pointed?

https://ester.co

Freeway user since 1997

http://www.walterdavisstudio.com