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

              
                <div class="modal">
  <a href="https://github.com/trevor-reznik" target="_blank">
    <div class="photo"></div>
  </a>
  <div class="banner"></div>
  <ul>
    <li>[elizabeth taylor]</li>
    <li>github.com/liz-taylor</li>
  </ul>
  <button class="contact">
    <p id="btnTxt">click to message me</p>
  </button>
  <div class="socials">
    <a href="https:://github.com/trevor-reznik" target="_blank"
      ><i class="fa fa-twitter darken"></i
    ></a>
    <a href="https://bymyself.life" target="_blank"
      ><i class="fa fa-linkedin darken"></i
    ></a>
    <a href="https://codepen.io/trevor-reznik" target="_blank"
      ><i class="fa fa-twitter darken"></i
    ></a>
    <a href="" target="_blank"><i class="fa fa-github darken"></i></a>
  </div>
  <form
    action="mailto:email@host.com"
    class="msg-form"
    method="post"
    enctype="text/plain"
    name="EmailForm"
  >
    <input id="name" type="text" placeholder="name" />
    <input id="email" type="text" placeholder="email" />
    <textarea id="comment" type="text" placeholder="message 😈"></textarea>
    <input type="submit" />
    <button>
      <p id="botBtnTxt">send</p>
    </button>
  </form>
</div>

<!-- Custom Fonts -->
<link
  rel="stylesheet"
  href="https://trevor-reznik.github.io/guides/custom-fonts/bymyself-fonts.css"
/>
<!-- Crows Gif 😈-->
<link
  rel="stylesheet"
  href="https://trevor-reznik.github.io/guides/windows95-profile-widget/windows95-contact-widget-assets.css"
/>
<!-- Font Awesome Icons -->
<link
  rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<!-- Jquery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
              
            
!

CSS

              
                body {
  background: linear-gradient(
      rgba(255, 255, 255, 0.09),
      rgba(255, 255, 255, 0.09)
    ),
    linear-gradient(#000000, #000000);
}

.darken {
  filter: brightness(68%) grayscale(50%);
}

.modal,
.banner,
.button.contact {
  outline: solid #000000 1px;
  outline-offset: -3px;
}

.modal {
  position: absolute;
  width: 300px;
  height: 400px;
  bottom: calc(50vh - 200px);
  left: calc(50vw - 150px);
  background-color: rgba(192, 192, 192, 0.99);
  font-family: retrosplice, Franklin Gothic Medium, fantasy, Times New Roman;
  border-radius: 3px;
  box-shadow: 0 0.75vh 0.5vw rgba(0, 0, 0, 0.3),
    0 1.6vh 1.25vw rgba(0, 0, 0, 0.4);
}

.modal.active {
  height: 490px;
}

.banner {
  position: relative;
  margin-top: -154px;
  width: 100%;
  height: 150px;
  border-top-right-radius: 4px;
  border-top-left-radius: 4px;
  background-position: center;
  background-size: cover;
  filter: brightness(78%) grayscale(95%) saturate(30%);
  border-bottom: solid 1px lightgrey;
}

.banner.active {
  height: 0;
}

.photo {
  z-index: 3;
  position: relative;
  border-radius: 50%;
  height: 150px;
  width: 150px;
  margin: 0 auto;
  top: 75px;
  background-color: white;
  background-size: cover;
  background-position: 50% 50%;
  -webkit-box-shadow: inset 0px 0px 5px 1px rgba(0, 0, 0, 0.3);
  -moz-box-shadow: inset 0px 0px 5px 1px rgba(0, 0, 0, 0.3);
  box-shadow: inset 0px 0px 5px 1px rgba(0, 0, 0, 0.3);
  -webkit-transition: top 0.7s ease-in-out, background 0.15s ease;
  -moz-transition: top 0.7s ease-in-out, background 0.15s ease;
  -o-transition: top 0.7s ease-in-out, background 0.15s ease;
  -ms-transition: top 0.7s ease-in-out, background 0.15s ease;
}

.photo.active {
  top: -80px;
}

.modal ul {
  list-style: none;
  text-align: center;
  padding-left: 0;
  margin-top: 87px;
  font-size: 20px;
}

.modal ul.active {
  opacity: 0;
  visibility: hidden;
}

li:nth-child(1) {
  font-family: adventure, Franklin Gothic Medium, Times New Roman;
  font-size: 1.85em;
}

li:nth-child(2) {
  font-family: pressStart, Franklin Gothic Medium, Times New Roman;
  font-size: 0.4em;
  padding-top: 0.85em;
}

.modal i {
  font-size: 25px;
  display: inline-block;
  margin-top: 10px;
  margin-left: 40px;
  margin-right: 150px;
  width: 300px;
  text-align: left;
  color: #c7d0e1;
}

button.contact {
  margin: .2em 2% auto 2%;
  text-align: center;
  width: 96%;
  height: 35px;
  border: outset #969696 .17em;
  font-family: adventure, fantasy, Times New Roman;
  font-size: 1em;
  text-transform: uppercase;
  color: white;
  background: #0000aa;
}

button.contact:hover {
  cursor: pointer;
  background-color: #2d2dac;
  text-shadow: 0.06em 0.285em #121212;
}

button.contact:focus {
  outline: 0;
}

button.contact p {
  margin-top: 0.45em;
}

.socials {
  width: 300px;
  height: 50px;
  margin-top: 0.545em;
  text-align: center;
  position: absolute;
}

.socials.active {
  opacity: 0;
  visibility: hidden;
}

.socials a i {
  display: inline;
  width: auto;
  margin-right: 15px;
  margin-left: 10px;
}

.socials a i:hover {
  filter: brightness(140%) drop-shadow(0.02em 0.1em rgba(12,12,12,.4));
  color: navy;
}

form {
  font-family: retroville, Times New Roman, monospace;
}

.msg-form {
  height: 0;
  overflow: hidden;
  width: 300px;
  z-index: -1;
}

.msg-form.active {
  height: 310px;
  z-index: 3;
}

.msg-form input {
  width: 200px;
  text-transform: capitalize;
  margin: 0 auto;
  font-family: retroville;
  border: 1px solid #dadee5;
  margin-top: 35px;
  height: 30px;
  display: block;
}

.msg-form input:focus,
.msg-form textarea:focus {
  border: 1px solid grey;
  outline: none;
  font-family: retroville, monospace;
}

::-webkit-input-placeholder {
  font-size: 12px;
  text-transform: uppercase;
  font-family: retroville, monospace;
  text-align: center;
}

.msg-form textarea {
  width: 200px;
  text-transform: capitalize;
  background-color: white;
  margin: 0 auto;
  display: block;
  margin-top: 40px;
  border: 1px solid #dadee5;
}

.msg-form button {
  margin-top: 60px;
}

              
            
!

JS

              
                $(document).ready(() => {
  $("button").click(() => {
    for (const nodes of [
      ".modal",
      ".banner",
      ".photo",
      ".socials",
      ".msg-form",
    ]) {
      $(nodes).toggleClass("active");
    }
    $("#btnTxt").text() == "back"
      ? $("#btnTxt").text("click to message me")
      : $("#btnTxt").text("back");
  });
});

transitions = {
  ".socials": "1.5",
  ".msg-form.active": "1.2",
  ".banner": ".9",
  ".modal": ".8",
  ".modal ul": ".75",
  ".button.contact": ".7",
  ".msg-form": ".6",
  ".msg-form textarea": ".5",
  ".socials a i": ".25",
  ".msg-form input": ".2",
  ".socials.active": ".15",
};

$(document).ready(() => {
  for (const className in transitions) {
    let style = document.createElement("style");
    style.innerHTML =
      className +
      " { " +
      "-webkit-transition: all " +
      transitions[className] +
      "s ease-in-out; " +
      "-ms-transition: all " +
      transitions[className] +
      "s ease-in-out; " +
      "-moz-transition: all " +
      transitions[className] +
      "s ease-in-out; " +
      "-ms-transition: all " +
      transitions[className] +
      "s ease-in-out; }";
    document.getElementsByTagName("head")[0].appendChild(style);
  }
});

              
            
!
999px

Console