00:00:00
Sponsor
Animations

Child Hover State

Easily add custom styles to text, buttons, links and more when hovering over it's parent element.

button
.button_text.vdx-hover
Hover over me

Instructions

Firstly, make sure you have the VisualDX script in your <head>. Checkout the Quick Start for how to do this.

Add hover state to child element

1

Add the attribute  vdx-child-hover as a custom attributes Name of a parent element. e.g. a button. You can so this with a Link Block, Div, or  Custom Element.

button
Custom Attributes
Name
vdx-child-hover
Value
2

Add the class vdx--hover as a combo class the child elements of the Link Block, Div, or Custom Element that you wish to style when the user hovers over the parent. (see step 1)

Style Selector
button_text
vdx--hover
3

Add styles to the combo class vdx--hover. These styles will become visible when the use hovers over the parent element.

.notice {!important}

How to save your combos classes.

Copy the vdx-child-hover element with with all combo classes added and save it to your style guide. This is ensure that you do not lose the combo classes when you use the Webflow class cleaner.

4

Remove combo class vdx--hover from the style selector and publish