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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <!-- <video poster="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/polina.jpg" id="bgvid" playsinline autoplay muted loop>
   -->

  <video poster="https://danielsilber-baker.com/standingRock/stillFootage.png" id="bgvid" playsinline autoplay muted loop>
 
<source src="http://danielsilber-baker.com/standingRock/trimmedFootage.mp4" type="video/mp4">
</video>
<div id="bodyPart">
<h1>Stand With Standing Rock: An Interactive Network Topology Exploration</h1>
<p>Dhruv, Serena, and  Daniel
</p>
<!--   <a href="http://thenewcode.com/777/Create-Fullscreen-HTML5-Page-Background-Video">a link if we want it</a> -->
<p>The Dakota Access Pipeline protests, also known by the hashtag #NoDAPL, are grassroots movements that began in spring 2016 in reaction to the approved construction of Energy Transfer Partners' Dakota Access Pipeline in the northern United States. The pipeline was projected to run from the Bakken oil fields in western North Dakota to southern Illinois, crossing beneath the Missouri and Mississippi Rivers, as well as under part of Lake Oahe near the Standing Rock Indian Reservation. </p>
  <p> The Standing Rock Sioux Tribe is deeply concerned about the construction of a major crude-oil pipeline that passes through its ancestral lands. There are two broad issues. First, the pipeline would pass under the Missouri River (at Lake Oahe) just a half a mile upstream of the tribe’s reservation boundary, where a spill would be culturally and economically catastrophic. Second, the pipeline would pass through areas of great cultural significance, such as sacred sites and burial grounds that federal law seeks to protect.</p>
<!-- <p>As resistance to the Dakota Access Pipeline in Standing Rock, N.D., concludes its seventh month, two narratives have emerged: We have never seen anything like this before.
This has been happening for hundreds of years.
Both are true. The scope of the resistance at Standing Rock exceeds just about every protest in Native American history. But that history itself, of indigenous people fighting to protect not just their land, but the land, is centuries old.</p> -->
  <div id = "sources"> SOURCES: <br> <br>
     <a href = "http://www.npr.org/sections/codeswitch/2016/11/22/502068751/the-standing-rock-resistance-is-unprecedented-it-s-also-centuries-old"> NPR: codeswitch </a> <br><br>
    <a href = "https://en.wikipedia.org/wiki/Dakota_Access_Pipeline_protests"> wikipedia </a> <br><br>
  <a href = "http://earthjustice.org/features/faq-standing-rock-litigation"> earthjustice.org </a>
  </div>
<button>Pause</button>
</div>
              
            
!

CSS

              
                body {
  margin: 0;
  background: #000; 
}

#sources{ 
font-size:  .7rem;
  margin-left: 18rem;
}
video { 
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    transform: translateX(-50%) translateY(-50%);
 background: url('www.danielsilber-baker.com/standingRock/stillFootage.png') no-repeat;
  background-size: cover;
  transition: 1s opacity;
}
.stopfade { 
   opacity: .5;
}

#bodyPart { 
  font-family: Agenda-Light, Agenda Light, Agenda, Arial Narrow, sans-serif;
  font-weight:100; 
  background: rgba(0,0,0,0.3);
  color: white;
  padding: 3rem;
  width: 35%;
  margin: .01rem;
  float: right;
  font-size: 1.3rem;
}
h1 {
  font-size: 1.8rem;
  text-transform: uppercase;
  margin-top: 0;
  letter-spacing: .3rem;
}

p {
  
  font-size: 1.1rem;
}
#polina button { 
  display: block;
  width: 80%;
  padding: .4rem;
  border: none; 
  margin: 1rem auto; 
  font-size: 1.3rem;
  background: rgba(255,255,255,0.23);
  color: #fff;
  border-radius: 3px; 
  cursor: pointer;
  transition: .3s background;
}
#polina button:hover { 
   background: rgba(0,0,0,0.5);
}

a {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  background:rgba(0,0,0,0.5);
  padding: .5rem;
  transition: .6s background; 
}
a:hover{
  background:rgba(0,0,0,0.9);
}
@media screen and (max-width: 500px) { 
  div{width:70%;} 
}
@media screen and (max-device-width: 800px) {
  html { background: url(//demosthenes.info/assets/images/polina.jpg) #000 no-repeat center center fixed; }
  #bgvid { display: none; }
}
              
            
!

JS

              
                var vid = document.getElementById("bgvid");
var pauseButton = document.querySelector("#bodyPart button");

function vidFade() {
  vid.classList.add("stopfade");
}

vid.addEventListener('ended', function()
{
// only functional if "loop" is removed 
vid.pause();
// to capture IE10
vidFade();
}); 


pauseButton.addEventListener("click", function() {
  vid.classList.toggle("stopfade");
  if (vid.paused) {
    vid.play();
    pauseButton.innerHTML = "Pause";
  } else {
    vid.pause();
    pauseButton.innerHTML = "Paused";
  }
})


              
            
!
999px

Console