It will be harder than it sounds. And even harder if you need to support older browsers like IE8.
The most practical solution that I can think of is to use an overlay element that has the same color as the background, but with a gradient rather than a solid background color.
The gradient will have a solid color, at least the size of the element that will be hidden so that it displays only the background color, but would have a hidden part that extends beyond the element and disappears to transparent in this hidden part.
This is then a simple case of overlay animation, so that the gradient gradually opens, showing the content behind it.
You will not use the normal fadeIn() function at all. Although it would look like lateral attenuation, from a technical point of view it would be like an effect to move the map from the top of the element to reveal it.
In older versions of IE, it can be difficult to obtain rights that use the proprietary function for gradients. This should be possible in theory, but the IE8 filter gradients have quite a few quirks that can catch you if you try to make smart things like this.
I donโt have time to write a working prototype for you, but hopefully this will give you enough starter to start writing.
source share