OverLay Popup
Simple overlay popup with scale effect using CSS pseudo element and jQuery. CSS animation effects will not be included
Tutorial No.3
Simple overlay popup with scale effect using CSS pseudo element and jQuery. CSS animation effects will not be included
Still remember us?
‒ Dont' forget our friend Font-Awesome
'fa-plus'
for the button'.overlay'
is the layer that appears when the button is clicked'.overlay-button'
is the div that contains the button'#overlay-button'
‒ Goal: when clicked, the '.overlay'
div toggles between having a class '.expand'
and not
':before'
inserts an element in front of another element ':before'
we are creating will have an empty content, we only need background shape and color':before'
will change to a bigger size'.expand'
class we are about to create will have the properties for the overlay div when clicked ‒ Position the '.overlay'
div and '.overlay:before'
as 'absolute'
:before
, we insert an element (1x1) in front of the overlay, behind the button (z-index:10003)'.expand'
and '.expand:before'
to describe what happens after the button is clicked'.expand'
makes the overlay visible, it's originally set to invisible'.expand:before'
tells the element we inserted to get bigger (2000 x 2000)':before'
a transition property, the growth is seen and timed