"Bootstrap form theme"
Bootstrap 3.1.0 Snippet by rgbskills

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container auth">
<h1 class="text-center">Bootstrap form theme <span>It's nice!</span> </h1>
<div id="big-form" class="well auth-box">
<form>
<fieldset>
<!-- Form Name -->
<legend>Nice form example</legend>
<div class="btn-group">
<a href="index.html" class="btn btn-default">All</a>
<a href="example1.html" class="btn btn-default">example 1</a>
<a href="example2.html" class="btn btn-default">example 2</a>
</div>
<!-- Text input-->
<div class="form-group">
<label class=" control-label" for="textinput">Username</label>
<div class="">
<input id="textinput" name="textinput" placeholder="Username" class="form-control input-md" type="text">
<span class="help-block">help</span>
</div>
</div>
<!-- Password input-->
<div class="form-group">
<label class=" control-label" for="passwordinput">Password</label>
<div class="">
<input id="passwordinput" name="passwordinput" placeholder="Password" class="form-control input-md" type="password">
<span class="help-block">help</span>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.margin-top-20{
margin-top: 20px;
}
body{
background:url('http://www.wallpaperup.com/uploads/wallpapers/2012/08/30/12087/3574f899daef41d2f145eba13ff7840f.jpg');
background-size:100% 100%;
background-attachment: fixed;
background-repeat:no-repeat;
font-family: 'Open Sans', sans-serif;
padding-bottom: 40px;
}
.auth h1{
color:#fff!important;
font-weight:300;
font-family: 'Open Sans', sans-serif;
}
.auth h1 span{
font-size:21px;
display:block;
padding-top: 20px;
}
.auth .auth-box legend{
color:#fff;
border:none;
font-weight:300;
font-size:24px;
}
.auth .auth-box{
background-color:#fff;
max-width:460px;
margin:0 auto;
border:1px solid rgba(255, 255, 255, 0.4);;
background-color: rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.2);
margin-top:40px;
-webkit-box-shadow: 0px 0px 30px 0px rgba(50, 50, 50, 0.32);
-moz-box-shadow: 0px 0px 30px 0px rgba(50, 50, 50, 0.32);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
(function(e,t,n,r){function o(t,n){this.$element=e(t);this.settings=e.extend({},s,n);this.init()}var i="floatlabel",s={slideInput:true,labelStartTop:"20px",labelEndTop:"10px",transitionDuration:.3,transitionEasing:"ease-in-out",labelClass:"",typeMatches:/text|password|email|number|search|url/};o.prototype={init:function(){var e=this;var n={"-webkit-transition":"all "+this.settings.transitionDuration+"s "+this.settings.transitionEasing,"-moz-transition":"all "+this.settings.transitionDuration+"s "+this.settings.transitionEasing,"-o-transition":"all "+this.settings.transitionDuration+"s "+this.settings.transitionEasing,"-ms-transition":"all "+this.settings.transitionDuration+"s "+this.settings.transitionEasing,transition:"all "+this.settings.transitionDuration+"s "+this.settings.transitionEasing};if(this.$element.prop("tagName").toUpperCase()!=="INPUT"){return}if(!this.settings.typeMatches.test(this.$element.attr("type"))){return}var r=this.$element.attr("id");if(!r){r=Math.floor(Math.random()*100)+1;this.$element.attr("id",r)}var i=this.$element.attr("placeholder");var s=this.$element.data("label");var o=this.$element.data("class");if(!o){o=""}if(!i||i===""){i="You forgot to add placeholder attribute!"}if(!s||s===""){s=i}this.inputPaddingTop=parseFloat(this.$element.css("padding-top"))+10;this.$element.wrap('<div class="floatlabel-wrapper" style="position:relative"></div>');this.$element.before('<label for="'+r+'" class="label-floatlabel '+this.settings.labelClass+" "+o+'">'+s+"</label>");this.$label=this.$element.prev("label");this.$label.css({position:"absolute",top:this.settings.labelStartTop,left:this.$element.css("padding-left"),display:"none","-moz-opacity":"0","-khtml-opacity":"0","-webkit-opacity":"0",opacity:"0"});if(!this.settings.slideInput){this.$element.css({"padding-top":this.inputPaddingTop})}this.$element.on("keyup blur change",function(t){e.checkValue(t)});t.setTimeout(function(){e.$label.css(n);e.$element.css(n)},100);this.checkValue()},checkValue:function(e){if(e){var t=e.keyCode||e.which;if(t===9){return}}var n=this.$element.data("flout");if(this.$element.val()!==""){this.$element.data("flout","1")}if(this.$element.val()===""){this.$element.data("flout","0")}if(this.$element.data("flout")==="1"&&n!=="1"){this.showLabel()}if(this.$element.data("flout")==="0"&&n!=="0"){this.hideLabel()}},showLabel:function(){var e=this;e.$label.css({display:"block"});t.setTimeout(function(){e.$label.css({top:e.settings.labelEndTop,"-moz-opacity":"1","-khtml-opacity":"1","-webkit-opacity":"1",opacity:"1"});if(e.settings.slideInput){e.$element.css({"padding-top":e.inputPaddingTop})}},50)},hideLabel:function(){var e=this;e.$label.css({top:e.settings.labelStartTop,"-moz-opacity":"0","-khtml-opacity":"0","-webkit-opacity":"0",opacity:"0"});if(e.settings.slideInput){e.$element.css({"padding-top":parseFloat(e.inputPaddingTop)-10})}t.setTimeout(function(){e.$label.css({display:"none"})},e.settings.transitionDuration*1e3)}};e.fn[i]=function(t){return this.each(function(){if(!e.data(this,"plugin_"+i)){e.data(this,"plugin_"+i,new o(this,t))}})}})(jQuery,window,document)
$(document).ready(function(){
//Floatlabel
$('input').floatlabel();
$('a, button').click(function(e){
e.preventDefault();
});
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

its a shame such bad design and quality can be found on the web. time wasted.

jude () - 9 years ago - Reply 0


helpfull

Murugesan () - 10 years ago - Reply 0


Lovely. This is really great, thank you!

SNAIL () - 10 years ago - Reply 0


I´m using Bootstrap 3.2.0 and don´t work. :'(

César González () - 10 years ago - Reply 0


I´m so sorry, It´s works FINE ! My fault ! Sorry and TY !! :D

César González () - 10 years ago - Reply 0


Was just going through the site and add to Like and comment on this. Talk about amazing work! I cannot wait to delve into this code and use it.

Dillon Carter () - 10 years ago - Reply 0


Thank You!

Rgbskills () - 10 years ago - Reply 0


hi, I'm new to this web site. i need to get the code for this snippet. so how can i do that?

yasitha perera () - 10 years ago - Reply 0


Just click on html (top left corner)

Rgbskills () - 10 years ago - Reply 0


if you are registered and logged in you can download the whole snippet by clicking on the cog wheel next to "Fork this" and choosing download from the menu.

maxsurguy () - 10 years ago - Reply 0


Oh!This realy good!Thank you~

Nan () - 10 years ago - Reply 0


Very bad...

MrSaooty a été supprimé () - 10 years ago - Reply 0