`

前端随笔之Bootstrap小例

阅读更多

html

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="../../myproject/imgs/title.png">
    <title>登录</title>
    <link href="../css/style.css" rel='stylesheet' type='text/css'/>
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="main">
    <div class="inset">
        <div class="social-icons">
            <div class="span"><a href="../../myproject/view/signin.html"><span
                    style="color: rgb(127, 182, 60);line-height: 26px;font-size: 16px;" class="glyphicon glyphicon-user"> SignIn</span><i>用户登录</i>
                <div class="clear"></div>
            </a></div>
            <div class="span1"><a href="../../myproject/view/signup.html"><span style="font-size: 16px;color: rgb(255, 140, 60);line-height: 26px;"
                                                                                class="glyphicon glyphicon-user"> SignUp</span><i>用户注册</i>
                <div class="clear"></div>
            </a></div>
            <div class="clear"></div>
        </div>
    </div>

    <form>
        <div class="lable">
            <input type="text" class="text" placeholder="请输入用户名" id="active">
        </div>
        <div class="clear"></div>
        <div class="lable-2">
            <input type="password" class="text" placeholder="请输入密码">
        </div>
        <div class="clear"></div>
        <div class="submit">
            <input type="submit" onclick="" value="登录">
        </div>
        <div class="clear"></div>
    </form>
</div>
</body>
</html>

 

 

/* 重置 */
html,body,div,span,h2,p,a,img,sub,u,i,menu,form
{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}
/*font:inherit继承*/
/*vertical-align:baseline;设置元素内容的垂直对齐方式*/
	/* 初始化 */
a{text-decoration:none;}
.txt-rt{text-align:right;}
.txt-lt{text-align:left;}
.txt-center{text-align:center;}
.float-rt{float:right;}
.float-lt{float:left;}
.clear{clear:both;}
.pos-relative{position:relative;}
.pos-absolute{position:absolute;}
.vertical-base{	vertical-align:baseline;}
.vertical-top{	vertical-align:top;}
nav.vertical ul li{	display:block;}
nav.horizontal ul li{	display: inline-block;}
img{max-width:100%;}

body{
	background:url(../imgs/back.jpeg)  no-repeat center fixed;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
 	background-size: cover;
 	background-position: center;
 	background-size: 100% 100%;/*规定背景图像的尺寸*/
}
body,.main h2,.main h3,span,
.span i,.span1,.lable input[type="text"],.span1 i,
.copy-right p a,input[type=submit],.lable-2 input[type="Password"]{
	font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.main{
	margin:7em auto 0;
	width:44%;
}
.inset {
	text-align: center;
	width: 100%;
}
.main h2,.main h3{
	font-size: 1em;
	text-align: center;
	color:#fff;
	padding:1em 0;
}
.main h3{
	font-size: 1em;
	text-align:left;
}
.main h3 span a{
	color:#1888A8;
	font-weight: bold;
}
.span {
	float:left;
	display: block;
	background:#3B5998;
	-webkit-transition: all 0.5s ease-out;
	-moz-transition: all 0.5s ease-out;
	-ms-transition: all 0.5s ease-out;
	-o-transition: all 0.5s ease-out;
	border:1px solid #3B5998;
	outline:none;
	width: 49.99%;
}
a span {
	padding:11px 12px;
	float: left;
	
}
.span:hover{
	background:#5D7BBA;
	color:#fff;
}
.span i {
	color: #fff;
	padding: 14px 14px;
	float: left;
	font-size: 18px;
}
.span1 {
	float:right;
	transition: all 0.5s ease-out;
	-webkit-transition: all 0.3s ease-out;
	-moz-transition: all 0.3s ease-out;
	-ms-transition: all 0.3s ease-out;
	-o-transition: all 0.3s ease-out;
	background: #55ACEE;
	outline:none;
	width: 49.7%;
}

.span1 i {
	color: #fff;
	padding: 15px 14px;
	float: left;
	font-size: 18px;
}
.span1:hover{
	background:#71B8ED;
	color:#fff;
}
.lable input[type="text"] {
	padding: 14px;
	width: 100%;
	font-size: 1em;
	margin: 18px 0px;
	border: none;
	color: #666666;
	cursor: pointer;
	background: none;
	float: left;
	outline: none;
	font-weight: 700;
	background: #ffffff;
}
.lable input[type="text"]:hover,.lable-2 input[type="text"]:hover,.lable-2 input[type="Password"]:hover{
	color: black;
	/*border-left:6px solid#7fe2fd;!* 左边框样式 *!*/
}
.lable-2 input[type="Password"] {
	padding: 14px;
	width: 100%;
	font-size: 1em;
	margin: 18px 0;
	border:none;
	color: #666666;
	cursor: pointer;/* 手状 */
	background: none;
	float: left;
	outline: none;
	font-weight: 700;
	background: #ffffff;
	-webkit-transition: all 0.3s ease-out;
	-moz-transition: all 0.3s ease-out;
	-ms-transition: all 0.3s ease-out;
	-o-transition: all 0.3s ease-out;
	border-left: 6px solid #fff;
	border-bottom: none;
	border-right: none;
	border-top: none;
}

.submit{
	overflow: hidden;
	padding: 5px 118px;
	text-align: center;
	/*border-radius: 6px;*/
}
input[type=submit] {
	border-radius: 16px;
	padding: 17px 30px;
	color: #fff;
	float: right;
	background: #55ACEE;
	border: 1px solid #40A46F;
	cursor: pointer;
	font-size: 18px;
	transition: all 0.5s ease-out;
	-webkit-transition: all 0.5s ease-out;
	-moz-transition: all 0.5s ease-out;
	-ms-transition: all 0.5s ease-out;
	-o-transition: all 0.5s ease-out;
	outline:none;
	width: 100%;
}

.submit input[type=submit]:hover {
	 background:#3B5998;;
	 border:1px solid white;
}

/*----自适应-----*/
@media (max-width:1440px){
	.main {
		width:46%;
		margin: 7em auto 0;
	}
}

@media (max-width:1366px){
	.main{
		width: 48%;
	}
	.span1 {
		width: 48.69%;
	}
}
@media (max-width:1280px){
	.main{
		width:53%;
	}
	
}
@media (max-width:1024px){
	.main{
		width: 66%;
		margin: 9em auto 0;
	}
	

}
@media (max-width:768px){
	.main {
	width:91%;
	margin: 6em auto 0;
	}
}

@media (max-width:640px){
	.main{
		width:90%;
		margin: 6em auto 0;
	}
	.span,.span1 {
		margin:0 auto;
		text-align:center;
		width: 100%;
		margin-bottom: 15px;
	}
	.main h2, .main h3 {
		padding: 0.5em 0;
		font-size: 1em;
	}
	.lable input[type="text"]{
	width: 94%;
	}
	.lable input[type="text"]{
		width: 100%;
		font-size: 1em;
		text-align: left;
		margin: 10px 0px;
		margin-left:0;
	}
	.lable-2 input[type="text"], .lable-2 input[type="text"],input[type="Password"] { 
		width: 94%;
		font-size: 1em;
		margin: 10px 0px;
		text-align: left;
	}
	input[type=submit] {
		padding: 15px 15px;
		font-size: 1em;
		color: #fff;
		text-align:center;
		width: 100%;
	}
	.main h3 {
		text-align: center;
	}
}
@media (max-width:480px){
	.main{
		width:90%;
		margin: 6em auto 0;
	}
	.lable input[type="text"]{
		width: 100%;


	}
@media (max-width:320px){
	.main {
		width: 90%;
		margin: 3em auto 0;
	}

	.span i {
		font-size: 16px;
	}

	.span1 i {
		padding: 15px 0px;
		font-size: 16px;
	}

	.lable input[type="text"]:first-child {
		width: 90%;
		padding: 13px 10px;
	}

	.lable input[type="text"], .lable input[type="text"], .lable-2 input[type="text"], .lable-2 input[type="text"] {
		width: 90%;
		font-size: 16px;
		padding: 13px 10px;
	}

	input[type="Password"] {
		font-size: 16px;
		padding: 13px 10px;
		width: 90%;
	}

	.main h3 {
		line-height: 28px;
	}
	}
}

 

 

css,换行和渐变

分享到:
评论

相关推荐

    bootstrap-table分别实现前端和后端的分页项目

    在业务系统开发中,对表格记录的查询、分页、排序等处理是非常常见的,在Web开发中,可以采用很多功能强大的插件来满足要求,且能极大的提高开发效率,本随笔介绍这个bootstrap-table是一款非常有名的开源表格插件,...

    使用bootstraptable插件实现表格记录的查询、分页、排序操作

    在业务系统开发中,对表格记录的查询、分页、排序等处理是非常常见的,在Web开发中,可以采用很多功能强大的插件来满足要求,且能极大的提高开发效率,本随笔介绍这个bootstrap-table是一款非常有名的开源表格插件,...

    基于BootStrap的Metronic框架实现页面链接收藏夹功能按钮移动收藏记录(使用Sortable进行拖动排序)

    在本篇随笔中,我们将探讨如何在基于BootStrap的Metronic框架中实现一个页面链接收藏夹功能,并特别关注如何使用Sortable JavaScript组件来实现收藏记录的拖动排序。Metronic是一个强大的响应式前端框架,它结合了...

    jQuery表格插件

    此外,DataTables还支持大量的预定义样式和自定义主题,可以轻松地与Bootstrap等前端框架集成。 2. **Flexigrid**:Flexigrid是一款基于jQuery的网格插件,它提供了可伸缩的列宽、排序、分页、搜索等功能。特别适合...

    单点登录源码

    基于bootstrap实现的响应式Material Design风格的通用后台管理系统,`zheng`项目所有后台系统都是使用该模块界面作为前端展示。 &gt; zheng-ui 各个子系统前台thymeleaf模板,前端资源模块,使用nginx代理,实现动静...

    erichasinternet.com:我的个人博客

    4. **前端框架/库**:为了提高开发效率,开发者可能使用了Bootstrap、Foundation等前端框架,提供预设的样式和组件。 5. **后端技术**:虽然没有直接提及,但一个完整的个人博客可能需要后端支持,如PHP、Node.js、...

    jQuery插件

    4. **布局管理**:栅格系统、滑动菜单、轮播图等,如`Bootstrap`、`Slick`。 5. **工具提示**和**模态对话框**:如`tooltip`、`popover`、`bootbox`。 6. **Ajax**处理:增强异步请求,如`jQuery.ajax`的增强版本。 ...

Global site tag (gtag.js) - Google Analytics