Change background color of sticky section when scrolling (no plugin)
This is a sticky section.
Please scroll down
Desktop only--
After making the section Sticky
(go to Section > Advanced > Motion Effect > Sticky Top)
Also in the Advanced Tab > Custom CSS, apply this code:
<code>selector.elementor-sticky--active{
/ change to the color of your choice /
background: #ccc;
}</code></pre>
<p>If you want to add an effect, for example resizing an image:
<pre data-lang="CSS"><code>selector.elementor-sticky--active{
background: #ccc;
}
selector img{
transition: 0.5s;
}
selector.elementor-sticky--active img{
scale: 0.5;
}</code></pre>