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

              
                <!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection" />
<!--JavaScript at end of body for optimized loading-->
<script type="text/javascript" src="js/materialize.min.js"></script>

<body>
  <div class="container">
    <div class="col s12">
      <div class="card">
        <div class="card-image cardHeaderBackground">
          <img src="https://images.unsplash.com/photo-1467007849282-42dad96c2312?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=a28387f8a3b2f7b3d966327ba5b3d15d"/>
        </div>
        <div class="card-content">
          <span class="card-title  grey-text text-darken-4">
            Customer Login
          </span>
          <a class="loginButton waves-effect waves-light btn activator">Login</a>
        </div>
        <div class="card-reveal">
          <span class="card-title grey-text text-darken-4">Customer Login
            <i class="material-icons right waves-effect">close</i></span>
          <form class="col s12">
            <div class="row">
              <div class="input-field col s12">
                <i class="material-icons prefix inputIcon">account_circle</i>
                <input placeholder="Username" id="icon_prefix" type="text" class="validate">
              </div>
              <div class="input-field col s12" style="margin-top: -15px">
                <i class="material-icons prefix inputIcon">lock</i>
                <input placeholder="Password" id="icon_prefix" type="password" class="validate">
              </div>
            </div>
            <div class="row">
              <div class="input-field col s6">
                <div class="switch rememberMeContainer">Remember Me</br>
                  <label class="rememberMeInput">
                    Off
                    <input type="checkbox">
                    <span class="lever"></span>
                    On
                  </label>
                </div>
              </div>
              <div class="col s6">
                <a class="loginButtonOpenCard waves-effect waves-light btn activator">Login</a>  
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</body>
              
            
!

CSS

              
                body
{
  margin-top: 30px;
}

.card .card-reveal
{
  top: 99% !important;  
}

.container
{
  width: 500px !important;
  height: 600px !important;
}

.card
{
  max-height: 500px !important;
}

.cardHeaderBackground
{
    background-size: cover;
    /* Fallback color if image not available  */
    background-color: #ccc;
}

.loginButton
{
  position: absolute;
  right: 0;
  bottom: 0;
  margin-right: 15px; 
  margin-bottom: 28px;
  background-color: #2c79f4;
}

.loginButton:hover
{
  opacity: 0.8;
  background-color: #2c79f4;
}

.inputIcon
{
  margin-top: 8px;
}

/* label color */
.input-field label 
{
  color: #000 !important;
}

/* label focus color */
.input-field input[type=text]:focus + label 
{
  color: #2c79f4 !important;
}
/* label underline focus color */
.input-field input[type=text]:focus 
{
  border-bottom: 1px solid #2c79f4 !important;
  box-shadow: 0 1px 0 0 #2c79f4 !important;
}

.input-field input[type=text]
{
  border-bottom: 1px solid #2c79f4 !important;
}

.input-field input[type=text]:active
{
  border-bottom: 1px solid #2c79f4 !important;
}

/* icon prefix focus color */
.input-field .prefix.active 
{
  color: #2c79f4;
}

.lever
{
  background-color: #ccc !important;
}

.lever::after
{
  background-color: #287bff !important;
}

.switch label input[type=checkbox]:checked + .lever
{
  background-color: #66a0ff !important;
}

.rememberMeInput
{
  float: right;
  margin-top: -20px !important;
  margin-right: -235px;
}

.rememberMeContainer
{
  margin-top: -30px !important;
}

.loginButtonOpenCard
{
  position: absolute;
  width: 100% !important;
  width: 90% !important;
  bottom: 0;
  left: 0;
  margin-left: 5% !important;
  margin-bottom: 15px;
  background-color: #2c79f4;
}

.loginButtonOpenCard:hover
{
  opacity: 0.8;
  background-color: #2c79f4;
}
              
            
!

JS

              
                
              
            
!
999px

Console