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

              
                <ul id="nav">
  <li><a href="#Home">  Home  </a></li>
  <li><a href="#Anime"> Anime</a></li>
</ul>
<section id="Home">
  <a class="button" href="#popup1">Click Here</a>
    <div id="popup1" class="overlay">
      <div class="popup">
        <h2>Hi</h2>
        <a class="close" href="#">&times;</a>
        <div class="content">
          <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">WATCH THIS</a> 
        </div>
      </div>
    </div>
</section>
<section id="Anime">
   <h1>Anime</h1>
   <button class="button" id="slide">click</button>
  <div id="slide_text">
    <h2> RECOMMEND WATCHING  (ANIME)</h2>
    <ul><br><br>
      <li>-TOKYO GHOUL</li>
      <li>-HUNTER x HUNTER</li>
      <li>-MY HERO ACADEMIA</li>
      <li>-JUJUTSU KAISEN</li>
      <li>-DR. STONE</li>
      <li>-RE:ZERO</li>
      <li>-THE GOD OF HIGH SCHOOL</li>
      <li>-DEMON SLAYER</li>
      <li>-ATTACK ON TITAN</li>
      <li>-FAIRY TAIL</li>
      <li>-ONE PIECE</li>
      <li>-BLEACH</li>
      <li>-CHARLOTTE</li>
      <li>-BLACK CLOVER</li>
    </ul>
  </div>
</section>
              
            
!

CSS

              
                body{
  background:black;
}
section{
  width:100%;
  margin-top:50px;
  height:500px;
}
a{
  color:white;
}
.popup a{
  color:blue;
}
#Home{
  background:#51C0AF;
  margin-top:50px;
  padding:100px 0;

}
#Home{
  background:black;
  text-align:center;
}

#Anime{
  background:black;
   text-align:center;
}
h1{
  text-align:center;
  color:white;
  padding:20px;
}
h2{
  font-size:23px;
}
#nav{
  text-align:center;
  background:red;
  width:100%;
  padding:20px;
  position:fixed;
  top:0;
    z-index:100;
}
#nav li{
  display:inline;
  padding:20px;
}

.box {
  width: 40%;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  padding: 35px;
  border: 2px solid #fff;
  border-radius: 20px/50px;
  background-clip: padding-box;
  text-align: center;
}

.button {
  font-size: 1em;
  padding: 10px;
  color: white;
  width:100px!important;
  margin:auto;
  background:black;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease-out;
  outline:none;
  border:none;
}
.button:hover {
  background: #06D85F;
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 500ms;
  visibility: hidden;
  opacity: 0;
}
.overlay:target {
  visibility: visible;
  opacity: 1;
}

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  width: 30%;
  position: relative;
  transition: all 5s ease-in-out;
}

.popup h2 {
  margin-top: 0;
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
  position: absolute;
  top: 20px;
  right: 30px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.popup .close:hover {
  color: #06D85F;
}
.popup .content {
  max-height: 30%;
  overflow: auto;
}

@media screen and (max-width: 700px){
  .box{
    width: 70%;
  }
  .popup{
    width: 70%;
  }
}
#Anime{ background:url(https://occ-0-2794-2219.1.nflxso.net/dnm/api/v6/E8vDc_W8CLv7-yMQu8KMEC7Rrr8/AAAABddWNPHBX5iJBtMkpKzNe8gWSv6RWERSmSWxtSDXOdJSv5jXblpHCMpfa1WJw9KxSFu_xjpB6jAnZDgWc3lpj3ACB2SW.jpg?r=af8);
  background-size:cover;
  padding-top:40px;
}
#Home{ background:url(https://www.highmeadowschool.org/students-sites/cy/image1.png);
  background-size:cover;
}
#top{
  width:100%;
  scroll-x:none;
  text-align:center;
  padding:20px;
  positon:relative;
}
h1{
  font-size:40px;
  color:#fff;
}
#slide_text{
  width:60%;
  background:white;
  text-align:center;
  padding:20px;
  left:130%;
  position:absolute;
}
              
            
!

JS

              
                // Select all links with hashes
$('a[href*="#"]')
  // Remove links that don't actually link to anything
.not('[href="#popup1"]')
  .not('[href="#0"]')
  .click(function(event) {
    // On-page links
    if (
      location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') 
      &&
      location.hostname == this.hostname
    ) {
      // Figure out element to scroll to
      var target = $(this.hash);
      target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
      // Does a scroll target exist?
      if (target.length) {
        // Only prevent default if animation is actually gonna happen
        event.preventDefault();
        $('html, body').animate({
          scrollTop: target.offset().top
        }, 1000, function() {
          // Callback after animation
          // Must change focus!
          var $target = $(target);
          $target.focus();
          if ($target.is(":focus")) { // Checking if the target was focused
            return false;
          } else {
            $target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
            $target.focus(); // Set focus again
          };
        });
      }
    }
  });
var t = TweenMax.to(['#slide_text'],1,{left:"50vw",marginLeft:"-30%"}).reversed(true);

function toggleDirection() {
  t.reversed( !t.reversed() );
}
$('#slide').click(function(){
  toggleDirection();
});
              
            
!
999px

Console