I have created an iPhone simulator using HTML. It's in German, but I can provide a translation if needed:
// JavaScript code for various functionalities related to the iPhone interface
/* CSS styling for the iPhone interface */
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400&display=swap" rel="stylesheet">
<div id="notification" onclick="closeNotification();">
<h1 id="notificationHeader"><b>New Email Received!</b></h1>
<p id="notificationDescription"></p>
</div>
<div id="phone">
<div id="topbar">
<!-- Top bar section of the iPhone interface -->
</div>
<div id="slider">
<div id="appsOne">
<!-- First set of apps on the home screen -->
</div>
<div id="appsTwo">
<!-- Second page with additional apps -->
</div>
</div>
<div id="homeButton" onclick="closeApp();"></div>
To get a better view of the iPhone interface, click on Full-Page in the snippet.
I'm facing an issue with two divs: #appsOne
and #appsTwo
within the #slider
div. On the main page, there are two apps displayed (#appsOne
) along with text (#appsTwo
). I want the apps (#appsOne
) to remain stationary while the text (#appsTwo
) should be on a separate page with horizontal scroll snap functionality. How can this be achieved?
Below is an image of how the interface looks without the slider and the #appsTwo
div: