占位符替换 占位符移动到上方的表单
XML/HTML Code
- <div class="page-container">
- <form class="bl_form">
- <input type="text" class="label_better" data-new-placeholder="Username" placeholder="Username">
- <input type="email" class="label_better" data-new-placeholder="Email Address" placeholder="Email Address">
- <input type="password" class="label_better" data-new-placeholder="Password" placeholder="Password">
- <input type="password" class="label_better" data-new-placeholder="Confirm Password" placeholder="Confirm Password">
- </form>
- </div>
CSS Code
- <style>
- body {
- background: #272D30;
- padding: 0;
- text-align: center;
- font-family: 'open sans';
- position: relative;
- margin: 0;
- height: 100%;
- }
- .wrapper {
- height: auto !important;
- height: 100%;
- margin: 0 auto;
- overflow: hidden;
- }
- .pointer {
- color: #9b59b6;
- font-family: 'Pacifico', cursive;
- font-size: 30px;
- margin-top: 15px;
- }
- pre {
- margin: 80px auto;
- }
- pre code {
- padding: 35px;
- border-radius: 5px;
- font-size: 15px;
- background: rgba(0,0,0,0.1);
- border: rgba(0,0,0,0.05) 5px solid;
- max-width: 500px;
- }
- .main {
- float: left;
- width: 100%;
- margin: 0 auto;
- }
- .main h1 {
- padding:20px 50px;
- float: left;
- width: 100%;
- font-size: 60px;
- box-sizing: border-box;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- font-weight: 100;
- margin: 0;
- padding-top: 25px;
- font-family: 'Pacifico';
- letter-spacing: 2px;
- }
- .main h1.demo1 {
- background: #1ABC9C;
- }
- .reload.bell {
- font-size: 12px;
- padding: 20px;
- width: 45px;
- text-align: center;
- height: 47px;
- border-radius: 50px;
- -webkit-border-radius: 50px;
- -moz-border-radius: 50px;
- }
- .reload.bell #notification {
- font-size: 25px;
- line-height: 140%;
- }
- .reload, .btn{
- display: inline-block;
- border: 4px solid #A2261E;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- background: #CC3126;
- display: inline-block;
- line-height: 100%;
- padding: 0.7em;
- text-decoration: none;
- color: #fff;
- width: 100px;
- line-height: 140%;
- font-size: 17px;
- font-family: open sans;
- font-weight: bold;
- }
- .reload:hover{
- background: #A2261E;
- }
- .btn {
- width: 200px;
- color: #fff;
- border: none;
- margin-left: 10px;
- background: rgba(255, 255, 255, 0.11);
- }
- .clear {
- width: auto;
- }
- .btn:hover, .btn:hover {
- background: rgba(255,255,255,0.3);
- }
- .btns {
- width: 410px;
- margin: 50px auto;
- }
- .credit {
- font-style: italic;
- text-align: center;
- color: #fff;
- padding: 10px;
- margin: 0 0 40px 0;
- float: left;
- width: 100%;
- }
- .credit a {
- color: #ccc;
- text-decoration: none;
- font-weight: bold;
- }
- .back {
- position: absolute;
- top: 0;
- left: 0;
- text-align: center;
- display: block;
- padding: 7px;
- width: 100%;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- background: rgba(0, 0, 0, 0.65);
- font-weight: bold;
- font-size: 13px;
- color: #fff;
- -webkit-transition: all 200ms ease-out;
- -moz-transition: all 200ms ease-out;
- -o-transition: all 200ms ease-out;
- transition: all 200ms ease-out;
- }
- .back:hover {
- background: rgba(0, 0, 0, 0.85);
- }
- .bl_form {
- margin: 150px 0;
- }
- .bl_form input {
- padding-top: 15px;
- background:#CFF;
- box-shadow: 0 2px 8px rgba(0,0,0,0.2);
- border: none;
- color:red;
- padding: 10px 15px;
- border-radius: 25px;
- font-size: 16px;
- outline: none;
- }
- .lb_wrap .lb_label.top, .lb_wrap .lb_label.bottombottom {
- left: 15px !important;
- }
- .lb_wrap .lb_label.left {
- left: 0;
- }
- .lb_label {
- font-weight: bold;
- color: #999;
- }
- .lb_label.active {
- color: #000;
- }
- </style>
原文地址:http://www.freejs.net/article_biaodan_834.html