其他分享
首页 > 其他分享> > 2.7 bootstrapDemo

2.7 bootstrapDemo

作者:互联网

2.7 bootstrapDemo

如果需要用到类似展示页面到官网查看

1 常用样式

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
		<script src="js/jquery-3.5.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="container">
			<div class="row">
				<div class="col-md-8">
					<form class="form-horizontal">
					  <div class="form-group">
					    <label for="inputEmail3" class="col-sm-2 control-label">用户名</label>
					    <div class="col-sm-10">
					      <input type="email" class="form-control" id="inputEmail3" placeholder="Email">
					    </div>
					  </div>
					  <div class="form-group">
					    <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
					    <div class="col-sm-10">
					      <input type="password" class="form-control" id="inputPassword3" placeholder="Password">
					    </div>
					  </div>

					  <div class="form-group">
					    <div class="col-sm-offset-2 col-sm-10">
					      <button type="submit" class="btn btn-default">登录</button>
					    </div>
					  </div>
					</form>
				</div>
				<div class="col-md-4">
					<table class="table table-bordered">
						<caption>Optional table caption.</caption>
						<thead>
							<tr>
								<th>#</th>
								<th>First Name</th>
								<th>Last Name</th>
								<th>Username</th>
							</tr>
						</thead>
						<tbody>
							<tr class="danger">
								<th scope="row">1</th>
								<td class="warning">Mark</td>
								<td>Otto</td>
								<td>@mdo</td>
							</tr>
							<tr>
								<th scope="row">2</th>
								<td>Jacob</td>
								<td>Thornton</td>
								<td>@fat</td>
							</tr>
							<tr>
								<th scope="row">3</th>
								<td class="info">Larry</td>
								<td>the Bird</td>
								<td>@twitter</td>
							</tr>
						</tbody>
					</table>
				</div>

			</div>
			<div class="row">
				<div class="col-md-6">
					<div class="form-group has-error has-feedback">
					  <label class="control-label" for="inputSuccess2">Input with success</label>
					  <input type="text" class="form-control" id="inputSuccess2">
					  <span class="glyphicon glyphicon-remove form-control-feedback"></span>
					</div>
				</div>
				<div class="col-md-6">
					<div class="dropup">
					  <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					    Dropup
					    <span class="caret"></span>
					  </button>
					  <ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
					    <li><a href="#">Action</a></li>
					    <li><a href="#">Another action</a></li>
					    <li><a href="#">Something else here</a></li>
					    <li role="separator" class="divider"></li>
					    <li><a href="#">Separated link</a></li>
					  </ul>
					</div>
				</div>
			</div>
		</div>
		<!-- Button trigger modal -->
		<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#mytest">
		  添加
		</button>
		<!-- Modal -->
		<div class="modal fade" id="mytest" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		  <div class="modal-dialog" role="document">
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
		        <h4 class="modal-title" id="myModalLabel">添加数据</h4>
		      </div>
		      <div class="modal-body">
		        <form>
		          <div class="form-group">
		            <label for="exampleInputEmail1">Email address</label>
		            <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
		          </div>
		          <div class="form-group">
		            <label for="exampleInputPassword1">Password</label>
		            <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
		          </div>
		          <div class="form-group">
		            <label for="exampleInputFile">File input</label>
		            <input type="file" id="exampleInputFile">
		            <p class="help-block">Example block-level help text here.</p>
		          </div>
		          <div class="checkbox">
		            <label>
		              <input type="checkbox"> Check me out
		            </label>
		          </div>
		        </form>
		      </div>
		      <div class="modal-footer">
		        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
		        <button type="button" class="btn btn-primary" data-dismiss="modal">Save changes</button>
		      </div>
		    </div>
		  </div>
		</div>
		

	</body>
</html>

2.bootstapdemo

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
		<script src="js/jquery-3.5.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/echarts.min.js" type="text/javascript" charset="utf-8"></script>
		<script>
			$(function(){
				// 基于准备好的dom,初始化echarts实例
				var myChart = echarts.init(document.getElementById('main'));
				
				// 指定图表的配置项和数据
				var option = {
					title: {
						text: '出勤图'
					},
					tooltip: {
						trigger: 'axis'
					},
					legend: {
						data: ['720A', '704A', '704B', '722']
					},
					grid: {
						left: '3%',
						right: '4%',
						bottom: '3%',
						containLabel: true
					},
					toolbox: {
						feature: {
							saveAsImage: {},
				
							restore: {}
						}
					},
					xAxis: {
						type: 'category',
						boundaryGap: false,
						data: ['周一', '周二', '周三', '周四', '周五', '周六']
					},
					yAxis: {
						type: 'value'
					},
					series: [{
							name: '720A',
							type: 'line',
							data: [120, 132, 101, 134, 90, 230, 210]
						},
						{
							name: '704A',
							type: 'line',
							data: [220, 182, 191, 234, 290, 330, 310]
						},
						{
							name: '704B',
							type: 'line',
							data: [150, 232, 201, 154, 190, 330, 410]
						},
						{
							name: '722',
							type: 'line',
							data: [320, 332, 301, 334, 390, 330, 320]
						}
					]
				};
				
				// 使用刚指定的配置项和数据显示图表。
				myChart.setOption(option);
			})
			
			
			
		</script>
		
	</head>
	<body>
		<div class="container">
			<div class="row clearfix">
				<div class="col-md-12 column">
					<ul class="nav nav-tabs">
						<li class="active">
							 <a href="#">首页</a>
						</li>
						<li>
							 <a href="#">简介</a>
						</li>
						<li class="disabled">
							 <a href="#">信息</a>
						</li>
						<li class="dropdown pull-right">
							 <a href="#" data-toggle="dropdown" class="dropdown-toggle">下拉<strong class="caret"></strong></a>
							<ul class="dropdown-menu">
								<li>
									 <a href="#">操作</a>
								</li>
								<li>
									 <a href="#">设置栏目</a>
								</li>
								<li>
									 <a href="#">更多设置</a>
								</li>
								<li class="divider">
								</li>
								<li>
									 <a href="#">分割线</a>
								</li>
							</ul>
						</li>
					</ul>
					<ul class="breadcrumb">
						<li>
							 <a href="#">Home</a>
						</li>
						<li>
							 <a href="#">Library</a>
						</li>
						<li class="active">
							Data
						</li>
					</ul>
				</div>
			</div>
			<div class="row clearfix">
				<div class="col-md-6 column">
					<table class="table">
						<thead>
							<tr>
								<th>
									编号
								</th>
								<th>
									产品
								</th>
								<th>
									交付时间
								</th>
								<th>
									状态
								</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>
									1
								</td>
								<td>
									TB - Monthly
								</td>
								<td>
									01/04/2012
								</td>
								<td>
									Default
								</td>
							</tr>
							<tr class="success">
								<td>
									1
								</td>
								<td>
									TB - Monthly
								</td>
								<td>
									01/04/2012
								</td>
								<td>
									Approved
								</td>
							</tr>
							<tr class="error">
								<td>
									2
								</td>
								<td>
									TB - Monthly
								</td>
								<td>
									02/04/2012
								</td>
								<td>
									Declined
								</td>
							</tr>
							<tr class="warning">
								<td>
									3
								</td>
								<td>
									TB - Monthly
								</td>
								<td>
									03/04/2012
								</td>
								<td>
									Pending
								</td>
							</tr>
							<tr class="info">
								<td>
									4
								</td>
								<td>
									TB - Monthly
								</td>
								<td>
									04/04/2012
								</td>
								<td>
									Call in to confirm
								</td>
							</tr>
						</tbody>
					</table>
					<div class="carousel slide" id="carousel-129170">
						<ol class="carousel-indicators">
							<li class="active" data-slide-to="0" data-target="#carousel-129170">
							</li>
							<li data-slide-to="1" data-target="#carousel-129170">
							</li>
							<li data-slide-to="2" data-target="#carousel-129170">
							</li>
						</ol>
						<div class="carousel-inner">
							<div class="item active">
								<img alt="" src="http://cdn.ibootstrap.cn/lorempixel.com/1600/500/sports/1/default.jpg" />
								<div class="carousel-caption">
									<h4>
										First Thumbnail label
									</h4>
									<p>
										Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
									</p>
								</div>
							</div>
							<div class="item">
								<img alt="" src="http://cdn.ibootstrap.cn/lorempixel.com/1600/500/sports/2/default.jpg" />
								<div class="carousel-caption">
									<h4>
										Second Thumbnail label
									</h4>
									<p>
										Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
									</p>
								</div>
							</div>
							<div class="item">
								<img alt="" src="http://cdn.ibootstrap.cn/lorempixel.com/1600/500/sports/3/default.jpg" />
								<div class="carousel-caption">
									<h4>
										Third Thumbnail label
									</h4>
									<p>
										Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
									</p>
								</div>
							</div>
						</div> <a class="left carousel-control" href="#carousel-129170" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a> <a class="right carousel-control" href="#carousel-129170" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
					</div>
				</div>
				<div class="col-md-6 column">
					<form role="form">
						<div class="form-group">
							 <label for="exampleInputEmail1">Email address</label><input type="email" class="form-control" id="exampleInputEmail1" />
						</div>
						<div class="form-group">
							 <label for="exampleInputPassword1">Password</label><input type="password" class="form-control" id="exampleInputPassword1" />
						</div>
						<div class="form-group">
							 <label for="exampleInputFile">File input</label><input type="file" id="exampleInputFile" />
							<p class="help-block">
								Example block-level help text here.
							</p>
						</div>
						<div class="checkbox">
							 <label><input type="checkbox" />Check me out</label>
						</div> <button type="submit" class="btn btn-default">Submit</button>
					</form>
				</div>
			</div>
		<div class="row">
			<div class="col-md-12">
				<div id="main" style="width: 600px;height:400px;"></div>
			</div>	
		</div>
		</div>
	</body>
</html>

3.echartsdemo

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/echarts.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="main" style="width: 600px;height:400px;"></div>
		<script type="text/javascript">
			// 基于准备好的dom,初始化echarts实例
			var myChart = echarts.init(document.getElementById('main'));

			// 指定图表的配置项和数据
			var option = {
				title: {
					text: '出勤图'
				},
				tooltip: {
					trigger: 'axis'
				},
				legend: {
					data: ['720A', '704A', '704B', '722']
				},
				grid: {
					left: '3%',
					right: '4%',
					bottom: '3%',
					containLabel: true
				},
				toolbox: {
					feature: {
						saveAsImage: {},

						restore: {}
					}
				},
				xAxis: {
					type: 'category',
					boundaryGap: false,
					data: ['周一', '周二', '周三', '周四', '周五', '周六']
				},
				yAxis: {
					type: 'value'
				},
				series: [{
						name: '720A',
						type: 'line',
						data: [120, 132, 101, 134, 90, 230, 210]
					},
					{
						name: '704A',
						type: 'line',
						data: [220, 182, 191, 234, 290, 330, 310]
					},
					{
						name: '704B',
						type: 'line',
						data: [150, 232, 201, 154, 190, 330, 410]
					},
					{
						name: '722',
						type: 'line',
						data: [320, 332, 301, 334, 390, 330, 320]
					}
				]
			};
			// 使用刚指定的配置项和数据显示图表。
			myChart.setOption(option);
		</script>

	</body>
</html>

标签:name,2.7,bootstrapDemo,data,elit,line,type,id
来源: https://blog.csdn.net/jiaguopeng/article/details/113447666