body { margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #fecc00; } .header { padding: 10px; } .logo { text-align: center; margin-bottom: 50px; margin-top: 50px; } label { font: 14px sans-serif; color: #2c2c2c; width: 60%; position: relative; text-align: left; margin-top: 10px; font-weight: 100; margin-bottom: 10px; } .field { display: flex; flex-flow: column-reverse; width: 95%; margin: 0 auto; } label, .input { transition: all 0.2s; } label:focus { color: #fff; } .input { font-size: 1.5em; border: 0; border-bottom: 1px solid #aa9023; background: transparent; } .fielderror { font-size: 1.5em; border: 0; border-bottom: 2px solid #f00; background: transparent; } .input:focus { outline: 0; border-bottom: 2px solid #447bb5; } .input:placeholder-shown + label { min-width: 66%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; transform-origin: left bottom; transform: translate(0, 2.5rem) scale(1.5); font-weight: 100; font-size: 12px; color: #000; } ::-webkit-input-placeholder { transition: inherit; opacity: 0; } .input:focus { opacity: 1; } .input + label, .input:focus + label { transform: translate(0, 0) scale(1); /* [1] */ cursor: pointer; /* [2] */ color: #447bb5; } .button:disabled { width: 90%; display: block; margin: 0 auto; margin-top: 15px; padding: 12px; background: #cccccc; border: 0; border-radius: 3px; color: #7f7f7f; } .button { width: 90%; display: block; margin: 0 auto; margin-top: 15px; padding: 12px; background: #0a3478; border: 0; border-radius: 3px; color: #fff; }