Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- BACKGROUND VIDEO --> 

	<video autoplay muted loop id="myVideo"> 
		<source src="staticVideo.mp4" type="video/mp4">
	</video>



	<!-- OVERLAY TEXT-->

<div class="content1"> 

	<h1 id= "header"> Welcome </h1>

	<p id="paragraph"> to the website about nothing... </p>
</div>

<!--div 2. the paragraph container-->

<div class="content2">
<h1> "Nothing Matters"</h1>
</div>

<!--div 3. the paragraph container-->
<div class="content3">
<p id="firstText">This is a website where nothing matters. A peaceful and minimal experience where you can enjoy the absense of thought and opinion because nothing truly matters. There is no ego here, only voidness. Close your eyes and meditate on the fact that nothing truly exists... </p>
</div>

<!-- Animated Text -->
<div class="animation"> 

<h1><span></span></h1>


</div>



<script src="script.js"></script>



              
            
!

CSS

              
                /*    Style the video: 100% width and height to cover the entire window*/

#myVideo {

	position: fixed;
	right: 0;
	bottom: 0;
	min-width: 100%;
	min-height: 100%;
	
}

.content1

{
	display: flex;
	flex-direction: column;
	top: 290px;
	position: fixed;
	align-items: center; 
	cursor: pointer;
	color: rgb(247, 224, 94); 
	width: 100%;
}

.content2

{
	display: flex;
	flex-direction: column;
	top: 990px;
	position: fixed;
	align-items: center; 
	cursor: pointer;
	color: rgb(247, 224, 94); 
	width: 100%;
}

h1 {

	font-size: 90px;
	font-family: 'Chango', cursive, sans-serif;
	padding: 0; 
	margin: 0 0 0 0;
}

p {
 	font-family: 'Chango', cursive, sans-serif;


}

.content3

{

	display: flex;
	flex-direction: column;

	top: 990px;
	position: fixed;
	align-items: center; 
	cursor: pointer;
	color: rgb(247, 224, 94); 
	width: 100%;
}

#firstText {

	width: 500px;
}

.animation
{

	display: flex;
	flex-direction: column;

	top: 250px;
	position: fixed;
	align-items: center; 
	cursor: pointer;
	color: rgb(247, 224, 94); 
	width: 100%;
}

span::before{

	content: "Inhale";
	-webkit-animation-name: animate;
          animation-name: animate;
	-webkit-animation-duration: 4s; 
          animation-duration: 4s;
	-webkit-animation-iteration-count: infinite;
          animation-iteration-count: infinite;
}
@-webkit-keyframes animate {

	0%{-webkit-content: "Inhale"; }
	50%{-webkit-content: "Exhale"; }
}
              
            
!

JS

              
                

let contentDiv = document.querySelector(".content"); 

let contentDiv2 = document.querySelector(".content2"); 



contentDiv.addEventListener("click", swapText); 


function swapText() {


contentDiv.style.top= "900px";


contentDiv2.style.top= "290px";

}



              
            
!
999px

Console