Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <div class="options">
  <div>
    <p>FLEX DIRECTION</p>
    <select class="field" id="direction">
      <option value="0">ROW</option>
      <option value="1">COLUMN</option>
      <option value="2">ROW REVERSE</option>
      <option value="3">COLUMN REVERSE</option>
    </select>
  </div>
  <div>
    <p>ALIGN ITEMS</p>
    <select class="field2" id="align">
      <option value="0">CENTER</option>
      <option value="1">END</option>
      <option value="2">FLEX-END</option>
      <option value="3">FLEX-START</option>
    </select>
  </div>
  <div>
    <p>JUSTIFY CONTENT</p>
    <select class="field3" id="justify">
      <option value="0">CENTER</option>
      <option value="1">SPACE-AROUND</option>
      <option value="2">FLEX-START</option>
      <option value="3">FLEX-END</option>
    </select>
  </div>
</div>
<div class="container">
  <div class="text-effect">
    <span>c</span>
    <span>o</span>
    <span>d</span>
    <span>e</span>
    <span>p</span>
    <span>e</span>
    <span>n</span>
  </div>
</div>
              
            
!

CSS

              
                body {
  background-color: #f2f8ff;
  font-family: sans-serif;
}
.container {
  height: 83vh;
  display: flex;
}
.options {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin-bottom: 1.5rem;
  @media only screen and (min-width: 460px) {
    flex-direction: row;
  }
  select {
    padding-left: 10px;
    height: 34px;
    width: 100%;
    background: #fff;
    border-radius: 5px;
    border: 0;
    box-shadow: 0px 10px 30px -8px rgba(6, 33, 62, 0.5);
  }
}
.text-effect {
  border: 3px solid #fff;
  border-radius: 12px;
  display: flex;
  height: 90%;
  width: 98%;
  justify-content: center;
  align-items: center;
  font-family: "Nunito", sans-serif;
  text-align: center;
  text-transform: uppercase;
  margin: 0 auto;
}
.text-effect span {
  color: transparent;
  font-size: 75px;
  text-shadow: 0 0 2px rgba(204, 208, 212, 0.9), 0 15px 25px rgba(0, 0, 0, 0.3),
    0 -2px 3px rgba(0, 0, 0, 0.1), 0 -5px 10px rgba(255, 255, 255, 0.5),
    0 5px 10px rgba(0, 0, 0, 0.3), 0 3px 4px rgba(255, 255, 255, 0.2),
    0 0 20px rgba(255, 255, 255, 0.45);
  display: inline-block;
  animation: animate 0.85s ease-in-out infinite alternate;
}

$letters: 7; //Define number of letters in animation - including spaces
$timing: 0.15s;//Delay between letters

//Sets timing differntly for each letter
@while $letters > 0 {
  .text-effect span:nth-child(#{$letters}) {
    animation-delay: $timing * $letters;
  }
  $letters: $letters - 1;
}

@keyframes animate {
  to {
    text-shadow: 0 0 2px rgba(204, 208, 212, 0.2), 0 0 3px rgba(0, 0, 0, 0.02),
      0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(255, 255, 255, 0),
      0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(255, 255, 255, 0),
      0 0 0 rgba(255, 255, 255, 0);
  }
}

@media only screen and (max-width: 990px) {
  .text-effect span {
    font-size: 60px;
  }
}
@media only screen and (max-width: 767px) {
  .text-effect span {
    font-size: 50px;
  }
}
@media only screen and (max-width: 479px) {
  .text-effect span {
    font-size: 55px;
  }
}
@media only screen and (max-width: 359px) {
  .text-effect span {
    font-size: 40px;
  }
}

              
            
!

JS

              
                $(document).ready(function () {
  const arrayDir = ["row", "column", "row-reverse", "column-reverse"];
  const arrayAli = ["center", "end", "flex-end", "flex-start"];
  const arrayJus = ["center", "space-around", "flex-start", "flex-end"];

  //direction
  $(".field").change(function () {
    for (i = 0; i < 4; i++) {
      if ($(this).val() == i) {
        $(".text-effect").css("flex-direction", arrayDir[i]);
      }
    }
  });

  //align
  $(".field2").change(function () {
    for (i = 0; i < 4; i++) {
      if ($(this).val() == i) {
        $(".text-effect").css("align-items", arrayAli[i]);
      }
    }
  });

  //justify
  $(".field3").change(function () {
    for (i = 0; i < 4; i++) {
      if ($(this).val() == i) {
        $(".text-effect").css("justify-content", arrayJus[i]);
      }
    }
  });
});

              
            
!
999px

Console