SHARE
TWEET

Untitled

a guest Jun 20th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5.   <meta charset="utf-8">
  6.   <title>Master</title>
  7.   <style>
  8.     * {
  9.       -webkit-box-sizing: border-box;
  10.       -webkit-backface-visibility: hidden;
  11.       -webkit-transition: translate3d(0, 0, 0)
  12.     }
  13.    HTML,
  14.     BODY {
  15.       width: 1920px;
  16.       height: 1080px;
  17.       background-color: transparent;
  18.       overflow: hidden;
  19.     }
  20.  
  21.     #iframeOne {
  22.       border: none;
  23.       width: 1920px;
  24.       height: 1080px;
  25.       position: absolute;
  26.       top: 0px;
  27.       left: 0px;
  28.       z-index: 2;
  29.       opacity: 1;
  30.       transition: opacity 1s;
  31.     }
  32.  
  33.     #iframeTwo {
  34.       border: none;
  35.       position: absolute;
  36.       width: 1920px;
  37.       height: 1080px;
  38.       top: 0px;
  39.       left: 0px;
  40.       z-index: 1;
  41.       opacity: 0;
  42.       transition: opacity 1s;
  43.     }
  44.  
  45.     #iframeOne.fade {
  46.       opacity: 0;
  47.     }
  48.  
  49.     #iframeTwo.fade {
  50.       opacity: 1;
  51.     }
  52. </style>
  53. </head>
  54.  
  55. <body>
  56.   <iframe id="iframeOne" src="firstpage.php"></iframe>
  57.   <iframe id="iframeTwo"></iframe>
  58.  
  59.   <script type="text/javascript">
  60.     var swapNumber = 2;
  61.  
  62.     function swap(newUrl) {
  63.  
  64.       if (swapNumber == 1) {
  65.         document.getElementById('iframeOne').src = newUrl;
  66.         dissolve();
  67.         swapNumber = 2;
  68.  
  69.       } else if (swapNumber == 2) {
  70.         document.getElementById('iframeTwo').src = newUrl;
  71.         dissolve();
  72.         swapNumber = 1;
  73.       }
  74.  
  75.       function dissolve() {
  76.         iframeOne.classList.toggle('fade');
  77.         iframeTwo.classList.toggle('fade');
  78.       }
  79.     }
  80.   </script>
  81. </body>
  82.  
  83. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top