Change Color of Header and Show-Hide Elements On Scroll

2 years ago

< 1 min read

Posted by:

Focus

Subscribe to newsletter

By subscribing you agree to with our Privacy Policy.

Share

Useful for transparent headers.

IMPORTANT

Under ‘Motion Effect’ settings, below ‘Offset’, you must set the ‘Effects Offset’ into ‘1’ or larger. Otherwise, the CSS won’t work.

CODE

/* This CSS is to change color */
.elementor-sticky--effects { background: #181818 /* Change the color */ !important;}

/* This CSS is to add border on scroll */
.elementor-sticky--effects { border-width: 0px 0px 1px 0px;
}

/* This CSS is hide elements */
.elementor-sticky--effects .hideme {display: none}


/* This CSS is show elements */
.showme {display: none}
.elementor-sticky--effects .showme {display: block}

/* To Smooth Things Out */
.elementor-sticky--effects, .hideme .showme {
  transition: 0.5s all ease-in-out;
}

DROP SHADOW

Use drop shadow instead of line for header border. Replace ‘border on scroll’ line with:

selector.elementor-sticky–effects { box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.25);

Read more

Breakpoints

< 1 min read

CSS Media Rule Based on Screen Sizes

This is very helpful for limiting custom CSS to certain breakpoints. Usage examples are Scrollbar, Offset Slides and Offset Carousel

Read more

Single Post

< 1 min read

Enhance WordPress Buttons

Optimize your WordPress site with these CSS tweaks. Elevate button aesthetics and code block readability for a better user experience

Read more

Woocommerce

< 1 min read

Disable Billing Address

Simplify checkout for virtual products or order via WhatsApp. Add this code in function.php. CODE PHP

Read more

Container

< 1 min read

Hide Scroll Bar On ‘Overflow: Auto’ Container

Add this following CSS code to the container: selector {-ms-overflow-style: none; /* IE and Edge / scrollbar-width: none; / Firefox

Read more

See How It Works

Create better websites, faster.

Download the Entire Library

Adaptative, neutrally designed components.

Customer Service

Focus Website

Today, April 30

Hi, there 👋

How can I help you?

Start Chat with:

We use cookie to improve your experience on our site. By using our site you consent cookies.