Procedure
HTML Structure:
- The HTML code starts with a standard structure including a heading (h1) and a div representing the pop-up box (with the class 'darksoul-pop-up').
- Inside the pop-up, there's a close button (image), a message, and a button that links to your CodePen page.
- The pop-up has an initial opacity of 0% and is positioned at the bottom right of the page.
CSS Styling:
- Font and Layout: The page uses the Poppins font, with Flexbox centering for the main content and the pop-up.
- Pop-up Styles: The pop-up (.darksoul-pop-up) is absolutely positioned with an animation to slide up and fade in using @keyframes 'pop-up'.
- Content Styling: The pop-up content is designed with rounded corners, and buttons have hover effects for better user interaction.
- Responsiveness: A media query is used to adjust the zoom for smaller screens, ensuring the pop-up looks good on mobile.
JavaScript Functionality:
- The script selects the pop-up div using getElementById.
- The 'closepopup' function hides the pop-up when the close button is clicked by setting its display to 'none'.
User Interaction:
- The pop-up automatically appears with a smooth animation on page load, sliding up into view.
- Clicking the close button hides the pop-up.
Feel free to explore, test, and modify this code to match your project’s requirements!