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

              
                <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Login Form</title>
    <!-- Link to external CSS file -->
    <link rel="stylesheet" href="css/style.css" />
  </head>
  <body>
    <!-- Main container for the login form -->
    <div class="box">
      <form>
        <!-- Title section -->
        <div class="title">
          <h1>Login Form</h1>
        </div>
        <!-- Input fields container -->
        <div class="input-box">
          <!-- Username input -->
          <label for="text" class="label-color">User name</label>
          <input
            id="text"
            name="text"
            type="text"
            placeholder="Username"
            required
          />
          <br />
          <!-- Password input -->
          <label for="password" class="label-color">Password</label>
          <input
            id="password"
            name="password"
            type="password"
            placeholder="Password"
            required
          />
          <br />
          <!-- Login button -->
          <input type="submit" class="Login" value="Login" />
          <br />
          <!-- Forgot password link -->
          <p class="link-text">Forget password ? <a href="#">Click Here</a></p>
          <!-- Sign up link -->
          <p class="link-text">
            Dont have an account ?
            <a href="#">Click Here</a>
          </p>
        </div>
      </form>
    </div>
  </body>
</html>
              
            
!

CSS

              
                /* Reset default styles and set font family */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* Center the content vertically and horizontally */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #23242a;
  height: 100vh;
}

/* Main container styles */
.box {
  position: relative;
  width: 370px;
  height: 450px;
  background: #1c1c1c;
  border-radius: 50px 5px;
  overflow: hidden;
}

/* Create animated gradient border effect */
.box::before,
.box::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 370px;
  height: 450px;
  background: linear-gradient(60deg, transparent, #45f3ff, #45f3ff);
  transform-origin: bottom right;
  animation: animate 6s linear infinite;
}

.box::after {
  background: linear-gradient(60deg, transparent, #d9138a, #d9138a);
  animation-delay: -3s;
}

/* Keyframes for gradient animation */
@keyframes animate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Form container styles */
form {
  position: absolute;
  inset: 2px;
  background: #28292d;
  border-radius: 50px 5px;
  z-index: 10;
  padding: 30px 30px;
  display: flex;
  flex-direction: column;
}

/* Title styles */
.title {
  width: 100%;
}

.title h1 {
  color: #45f3ff;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 20px;
}

/* Input box styles */
form .input-box {
  width: 100%;
  margin-top: 20px;
}

form .input-box input {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  outline: none;
  border-width: 3px;
  border-radius: 15px;
  padding: 10px 20px;
  font-size: 1rem;
  margin: 10px 0px 10px 0px;
  color: white;
}

form .input-box input::placeholder {
  color: #cdd1d2;
}

/* Submit button styles */
form .input-box input[type="submit"] {
  background-color: #45f3ff;
  cursor: pointer;
  color: #16100e;
  filter: drop-shadow(0 5px 10px #45f3ff);
  margin-bottom: 20px;
}

/* Link text styles */
form .link-text {
  padding-top: 15px;
  color: rgb(103, 173, 183);
  font-size: 0.85rem;
}

form .link-text a {
  text-decoration: none;
  color: rgb(153, 41, 99);
  font-weight: 700;
}

/* Label color */
.label-color {
  color: #9eb3b5;
}
              
            
!

JS

              
                
              
            
!
999px

Console