cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              body {
  background: #b6723d;  
}

H1 {
  font-size: 30px;
  color: white;
  text-align: center;
}

$loginColor: #fff;

#login {
    width: 400px;
    height: 300px;
    background: $loginColor;
    box-shadow: 6px 6px 5px 0px rgba(0,0,0,0.55);
    margin-left: auto;
    margin-right: auto;
    margin-top: 15%;
  
    .box{
        height: 100%;
        padding-top: 20px;
        width: 350px;
        margin-left:auto;
        margin-right:auto;
        position: relative;
         
        label {
          position: relative;
          top:  28px;
          color: #999999;
          z-index: 99;
        }
        
        .animate-label {
          animation: moveTop 0.2s infinite;
          animation-iteration-count: 1;
          animation-fill-mode: forwards;
        }
        
        .checkbox-label {
          position: relative;
          top:  23px;
          left: 20px;
          color: #999999;
        }
       
        input {
          z-index:1;
          margin-top: 5px;
          width: 100%;
          height: 30px;
         
          border: 1px solid #ccc;
          border-top: 0px;
          border-left: 0px;
          border-right: 0px;
          &:focus {
             outline: 0;
             border: 1px solid #ccc;
             border-top: 0px;
             border-left: 0px;
             border-right: 0px;
          }
        }
        
        hr {
          margin-top: 0px;
          transform: scaleX(0);
          border-color: #00adef;
          border-bottom-width: 2px; 
          transition: all 450ms cubic-bezier(.23, 1, .32, 1) 0ms;
        }
        
      .hr_focus {
          transform: scaleX(1);
      }
     
        input[type="checkbox"] {
          margin-top: 20px;
          border-top: 0;
          border-left: 0;
          border-right: 0;
          float: left;
          width: 25px;
          height: 25px;
        }
        
        button {
            margin-top: 20px;
            width: 100%;
            height: 50px;
            box-shadow: 0px 1px 0px 0px #f0f7fa;
            background:linear-gradient(to bottom, #33bdef 5%, #019ad2 100%);
            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bdef', endColorstr='#019ad2',GradientType=0);
            background-color:#33bdef;
            border-radius:6px;
            border:1px solid #057fd0;
            display:inline-block;
            cursor:pointer;
            color:#ffffff;
            font-family:Arial;
            font-size:25px;
            font-weight:bold;
            padding:6px 24px;
            text-decoration:none;
            text-shadow:0px -1px 0px #5b6178;
            
            &:hover {
              background:linear-gradient(to bottom, #019ad2 5%, #33bdef 100%);
              filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#019ad2', endColorstr='#33bdef',GradientType=0);
              background-color:#019ad2;
            }
            
            &:active {
              position:relative;
              top:1px;
            }
          }
         
     }
}

 @keyframes moveTop {
    from {
      top:23px;
    }
    
    to {
      top:0px;
      color: #00adef;
      font-size: 10px;
    }
  }
            
          
!
            
              /** @jsx React.DOM **/
var LoginInput = React.createClass({
  		getInitialState: function() {
        return {
          	focus: "",
            hr_focus: ""
        };
      },
  		componentDidMount: function () {
        
      },
  		componentWillUnmount: function ()  {
     		
  		},
  		changeHandle: function() {
      },
  		focus: function() {
        this.setState({focus: "animate-label", hr_focus: "hr_focus"});
      },
  		blur: function(event) {
        if(event.target.value.length === 0) {
        	this.setState({focus: "", hr_focus:""});
        }
      },
    	render: function() {
      	return (
          <div>
          		<label htmlFor={"focus"+this.props.name} 
          					 onClick={this.focus} 
          					 className={this.state.focus}>{this.props.name}</label>
          		<input id={"focus"+this.props.name} onFocus={this.focus} onBlur={this.blur} />
           <hr className={this.state.hr_focus}></hr>
          </div>
        );
    }
});

var loginStyle = {
  	email_focus: {
      backgroundColor: "red"
    }
};

var Login = React.createClass({
  		getInitialState: function() {
        return {
          	email_focus: "",
          	password_focus: "",
        };
      },
  		componentDidMount: function () {
        
      },
  		componentWillUnmount: function ()  {
     		
  		},
  		changeHandle: function() {
      },
  		focusInput: function() {
       
      },
    	render: function() {
      	return (
          <div className="box">
          		<LoginInput name="Email" />
              <LoginInput name="Password" />
          		<input type="checkbox" id="c1" name="cc" />
          		<label className="checkbox-label" htmlFor="c1">keep login?</label>
          		<button> Login In </button>
          </div>
        );
    }
});

React.render(
      <Login />, document.getElementById('login')
);
            
          
!
999px
Loading ..................

Console