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

              
                <section>
  <div class="text-effect1 effect">
    <p>
      <span class="text-wrapper">
        <span>The&nbsp;1st</span>
        <span>Text&nbsp;effect</span>
      </span>
    </p>
  </div>
  <div class="text-effect2 effect">
    <div class="top-bottom-borders"></div>
    <div class="right-left-borders"></div>
    <div class="text-wrapper">
      <p>
        <span>The&nbsp;2nd</span>
        <span>Text&nbsp;effect</span>
      </p>
    </div>
  </div>
  <div class="text-effect3 effect">
    <hr>
    <hr>
    <hr>
    <hr>
    <p>
      <span>The&nbsp;3rd</span>
      <span>Text&nbsp;effect</span>
    </p>
  </div>
  <div class="text-effect4 effect">
    <div class="overlay"></div>
    <p>
      <span>The&nbsp;4th</span>
      <span>Text&nbsp;effect</span>
    </p>
  </div>
  <div class="text-effect5 effect">
    <p>
      <span class="text-wrapper"><span class="light-text">The&nbsp;5th</span></span>
      <span class="text-wrapper"><span class="bold-text">Text&nbsp;effect</span></span>
    </p>
  </div>
  <div class="text-effect6 effect">
    <div class="overlay"></div>
    <p>
      <span>The&nbsp;6th</span>
      <span>Text&nbsp;effect</span>
    </p>
  </div>
  <div class="text-effect7 effect">
    <p>
      <span>The&nbsp;7th</span>
      <span>Text&nbsp;effect</span>
    </p>
  </div>
  <div class="text-effect8 effect">
    <p>
      <span>The&nbsp;8th&nbsp;effect</span>
      <span>The&nbsp;8th&nbsp;effect</span>
      <span>The&nbsp;8th&nbsp;effect</span>
      <span>The&nbsp;8th&nbsp;effect</span>
      <span>The&nbsp;8th&nbsp;effect</span>
    </p>
  </div>
  <div class="text-effect9 effect">
    <span class="text-wrapper1"><span>The&nbsp;9th&nbsp;effect</span></span>
    <span class="text-wrapper2"><span>The&nbsp;9th&nbsp;effect</span></span>
  </div>
  <div class="text-effect10 effect">
    <p>
      <span class="text-wrapper">
        <span>The</span>
      </span>
      <span class="text-wrapper">
        <span>10th</span>
      </span>
      <span class="text-wrapper">
        <span>effect</span>
      </span>
    </p>
  </div>
</section>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;800&display=swap");

/* You'll notice some repetitive code. It's on purpose */

* {
  padding: 0;
  margin: 0;
}

/* Layout */

body {
  display: flex;
  height: 100vh;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1800px;
}

/* Common */

.effect {
  margin: 40px;
}

span {
  display: block;
  font-size: calc(1.5rem + 0.5vw);
}

span:first-child {
  font-family: "Montserrat Light", sans-serif;
}

span:last-child {
  font-family: "Montserrat ExtraBold", sans-serif;
}

/* Text effect 1 */

.text-effect1 p {
  border-left: 2px solid #000;
  padding-left: 20px;
  transform: scaleY(0);
  animation: scaleUpBorder 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
  overflow: hidden;
}

@keyframes scaleUpBorder {
  to {
    transform: scaleY(1);
  }
}

.text-effect1 .text-wrapper {
  transform: translateX(calc(-100% - 20px));
  animation: slideTextRight 1s 0.5s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes slideTextRight {
  to {
    transform: translateX(0%);
  }
}

/* Text effect 2*/

.text-effect2 {
  position: relative;
}

.text-effect2 .top-bottom-borders {
  position: absolute;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  /* top: 0;
    left: 0;
    right: 0;
    bottom: 0; */
  inset: 0;
  transform: scaleX(0);
  animation: scaleUpHorizontally 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

.text-effect2 .right-left-borders {
  position: absolute;
  border-right: 2px solid #000;
  border-left: 2px solid #000;
  inset: 0;
  transform: scaleY(0);
  animation: scaleUpVertically 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

.text-effect2 .text-wrapper {
  overflow: hidden;
}

.text-effect2 p {
  text-align: center;
  padding: 20px;
  transform: translateY(100%);
  animation: slideTextUp 1s 0.1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes slideTextUp {
  to {
    transform: translateY(0%);
  }
}

@keyframes scaleUpVertically {
  to {
    transform: scaleY(1);
  }
}

@keyframes scaleUpHorizontally {
  to {
    transform: scaleX(1);
  }
}

/* Text effect 3 */

.text-effect3 {
  position: relative;
  overflow: hidden;
}

.text-effect3 hr {
  position: absolute;
  border: none;
}

.text-effect3 hr:nth-child(1) {
  width: 100%;
  border-top: 2px solid #000;
  transform: translateX(-100%);
  animation: translateHrHorizontally 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

.text-effect3 hr:nth-child(2) {
  height: 100%;
  border-right: 2px solid #000;
  right: 0;
  transform: translateY(100%);
  animation: translateHrVertically 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

.text-effect3 hr:nth-child(3) {
  width: 100%;
  border-bottom: 2px solid #000;
  bottom: 0;
  transform: translateX(100%);
  animation: translateHrHorizontally 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

.text-effect3 hr:nth-child(4) {
  height: 100%;
  border-left: 2px solid #000;
  transform: translateY(-100%);
  animation: translateHrVertically 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes translateHrHorizontally {
  to {
    transform: translateX(0%);
  }
}

@keyframes translateHrVertically {
  to {
    transform: translateY(0%);
  }
}

.text-effect3 p {
  padding: 20px;
  opacity: 0;
  animation: fadeTextIn 0.5s 0.9s forwards;
}

@keyframes fadeTextIn {
  to {
    opacity: 1;
  }
}

/* Text effect 4 */

.text-effect4 {
  position: relative;
}

.text-effect4 .overlay {
  position: absolute;
  z-index: 1000;
  width: 100%;
  height: 100%;
  background-color: #000;
  transform: scaleX(0);
  transform-origin: left;
  animation: scaleOverlay 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes scaleOverlay {
  50% {
    transform: scaleX(1);
  }
  75% {
    transform: scaleX(1);
    transform-origin: left;
  }
  76% {
    transform-origin: right;
  }
  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}

.text-effect4 p {
  opacity: 0;
  animation: revealText 0.1s 0.4s forwards;
}

@keyframes revealText {
  to {
    opacity: 1;
  }
}

/* Text effect 5 */

.text-effect5 .text-wrapper {
  overflow: hidden;
}

.text-effect5 .text-wrapper .light-text {
  font-family: "Montserrat Light", sans-serif;
  transform: translateY(100%);
  animation: revealTextUp 0.8s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

.text-effect5 .text-wrapper .bold-text {
  transform: translateY(100%);
  animation: revealTextUp 0.8s 0.1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes revealTextUp {
  to {
    transform: translateY(0%);
  }
}

/* Text effect 6 */

.text-effect6 {
  position: relative;
  padding: 20px;
  overflow: hidden;
}

.text-effect6 .overlay {
  position: absolute;
  inset: 0;
  background-color: #fff;
  border-left: 2px solid #000;
  transform: translateX(0%);
  animation: translateOverlay 1.4s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes translateOverlay {
  to {
    transform: translateX(101%);
  }
}

/* Text effect 7 */

.text-effect7 {
  padding: 20px;
  overflow: hidden;
  background-color: #000;
  color: #fff;
  transform: scaleY(0);
  animation: scaleUpBackground 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes scaleUpBackground {
  to {
    transform: scaleY(1);
  }
}

.text-effect7 p {
  transform: translateY(calc(100% + 20px));
  animation: slideInText 0.8s 0.5s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes slideInText {
  to {
    transform: translateY(0%);
  }
}

/* Text effect 8 */

.text-effect8 span {
  font-family: "Montserrat ExtraBold", sans-serif;
  color: rgba(0, 0, 0, 0);
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0);
  text-stroke: 1px rgba(0, 0, 0, 0);
}

@keyframes reveal {
  1% {
    color: rgba(0, 0, 0, 1);
  }
  50% {
    color: rgba(0, 0, 0, 1);
  }
  51% {
    color: rgba(0, 0, 0, 0);
  }
  100% {
    -webkit-text-stroke: 1px rgba(0, 0, 0, 1);
    text-stroke: 1px rgba(0, 0, 0, 1);
  }
}

.text-effect8 span:nth-child(1) {
  animation: reveal 1s 0.2s forwards;
}

.text-effect8 span:nth-child(2) {
  animation: reveal 1s 0.4s forwards;
}

.text-effect8 span:nth-child(3) {
  animation: reveal 1s 0.6s forwards;
}

.text-effect8 span:nth-child(4) {
  animation: reveal 1s 0.8s forwards;
}

.text-effect8 span:nth-child(5) {
  animation: reveal 1s 1s forwards;
}

/* Text effect 9 */

.text-effect9 .text-wrapper1,
.text-effect9 .text-wrapper2 {
  overflow: hidden;
}

.text-effect9 .text-wrapper1 span {
  transform: translate(-100%, 50%) skew(60deg);
  animation: slideTopHalf 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes slideTopHalf {
  to {
    transform: translate(0%, 50%) skew(0deg);
  }
}

.text-effect9 .text-wrapper2 span {
  transform: translate(100%, -50%) skew(-60deg);
  animation: slideBottomHalf 1s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes slideBottomHalf {
  to {
    transform: translate(0%, -50%) skew(0deg);
  }
}

/* Text effect 10 */

.text-effect10 {
  overflow: hidden;
}

.text-effect10 p {
  transform: scale(10);
  animation: scaleDown 0.8s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleDown {
  to {
    transform: scale(1);
  }
}

.text-effect10 .text-wrapper {
  overflow: hidden;
}

.text-effect10 span {
  display: inline-block;
}

.text-effect10 .text-wrapper:first-child span {
  transform: translateX(101%);
  animation: slideIn 0.8s 0.8s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

.text-effect10 .text-wrapper:last-child span {
  transform: translateX(-101%);
  animation: slideIn 0.8s 0.8s forwards cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes slideIn {
  to {
    transform: translateX(0%);
  }
}

/* Responsiveness */

@media screen and (min-width: 1920px) {
  span {
    font-size: 2.2rem;
  }
}

@media screen and (max-width: 596px) {
  body {
    height: unset;
  }
}

              
            
!

JS

              
                // Who needs JS?

              
            
!
999px

Console