Bootstrap介绍:  

    Bootstrap 是最受欢迎的 HTML、CSS 和 JS 框架,用于开发响应式布局、移动设备优先的 WEB 项目。

    Bootstrap特点:

          一、预处理脚本:虽然可以直接使用 Bootstrap 提供的 CSS 样式表,不要忘记 Bootstrap 的源码是基于最流行的 CSS 预处理脚本 - LessSass 开发的。你可以采用预编译的 CSS 文件快速开发,也可以从源码定制自己需要的样式。

          二、一个框架、多种设备:你的网站和应用能在 Bootstrap 的帮助下通过同一份代码快速、有效适配手机、平板、PC 设备,这一切都是 CSS 媒体查询(Media Query)的功劳。

          三、特性齐全:Bootstrap 提供了全面、美观的文档。你能在这里找到关于 HTML 元素、HTML 和 CSS 组件、jQuery 插件方面的所有详细文档。

    准备工作:

    下载Bootstrap,中文站地址:http://v3.bootcss.com/

    下载jQuery,地址为http://jquery.com/download/

                   下载生产版(压缩版)或开发版(未压缩版)

    Bootstrap和jquery加入到Web项目的目录中

         

     网页中使用bootstrap,引入bootstrap与jquery相关文件,至少3个。

      使用bootstrap编写漂亮的界面,建议从Bootstrap局CSS样式然后到Bootstrap组件最后Bootstrap JavaScript插件的顺序学习。

      以下是一个简单的页面,使用bootstrap css美化了我们的页面;效果是不是比我们程序员写的页面漂亮的许多

	<!-- 使用bootstrap css美化按钮 -->
	<button type="button" class="btn btn-default">显示列表</button>
	<button type="button" class="btn btn-success">添加数据</button>
	<a class="btn btn-link" href="http://www.itsource.cn">源代码教育官方网站</a>
	
	<br /><br />
	<!-- 使用bootstrap css美化表单 -->
	<div class="container-fluid">
		<form>
			<div class="form-group">
				<label for="email">E-mail</label> <input
					type="email" class="form-control" id="email"
					placeholder="E-mail">
			</div>
			<div class="form-group">
				<label for="password">密码</label> <input
					type="password" class="form-control" id="password"
					placeholder="Password">
			</div>
			<div class="checkbox">
				<label> <input type="checkbox">同意协议
				</label>
			</div>
			<button type="submit" class="btn btn-default">提交</button>
		</form>
	</div>

     

posted on 2015-02-05 13:40  姚欣  阅读(969)  评论(0)    收藏  举报