iOS issue: fixed position

In this example below you will see how to do a iOS issue: fixed position with some HTML / CSS and Javascript

This awesome code was written by guyom, you can see more from this user in the personal repository.
You can find the original code on
Copyright guyom ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

  <meta charset="UTF-8">
  <title>iOS issue: fixed position</title>
      <link rel="stylesheet" href="css/style.css">



  <div class="main">
    <div style="position: fixed; top: 0; left: 0; width: 100%; height: 150px; padding: 50px; background: rgba(0, 0, 0, 0.25);">
    <div style="transform: translate3d(0,0,0);">
        <input type="button" value="Input Button" />



/*Downloaded from */
.main {
    position: relative;
    height: 1600px;
    background: gold;
    transform: translate3d(0,0,0);

.main * {
    transform: translate3d(0,0,0);