Changing a transparent header to an opaque header on scroll can be achieved in several different methods and with custom code. However, if you would like a simple Elementor solution, you may follow the tutorial below; using the native Scrolling Effects.
If you have not already done so, you will need to create a custom Header Template using the theme builder. Start by creating a two column header section with your logo in an Image Widget and a Navigation Widget.
For the next steps we will be using the Advanced Tab in the Section Controls.
The most common way of creating a transparent header is to give the section a negative margin equal to the height of the section. From the Advanced Tab, unlock the margin controls and set the bottom to a negative value (example: -125px). This will move the section that is below the header to move to the top of the page.
You will also need to increase the Z-index of the section to make sure that it always remains on top of the content. You may enter any number higher than the rest of your website’s content, but many designers enter 1,000.
From the Motion Effects accordion, select the Sticky option from the dropdown and set to Top.
Now that we have a basic transparent header section created, we will add the scrolling effect.
For the following steps we will be using the Style Tab in the Section Controls
From the color picker, set the final background color or gradient in the color picker.
From the controls panel, toggle the Scrolling Effects selector.
From the viewport sliders, we now need to adjust the values to create the desired effect. Scroll to the spot on your page where you want to have the full opacity and decrease the Top value until your heading is 100% opacity (example: 25%). You may now increase the value of the Bottom. In the example above we wish the effect to happen rather quickly so we will set the values very close together (example: 22%). This will cause the effect to happen over a 3% page scroll.
You will need to adjust or make allowances for mobile and tablets. It is a matter of finding that sweet spot.