Boostrap之模拟框使用

Boostrap之模拟框使用


前言

本文是关于使用boostrap模拟框实现“设备注册”


一、实现结果

在这里插入图片描述

二、代码实现

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"> 
	<title>Bootstrap 实例 - 模态框(Modal)插件</title>
	<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>

<h2>创建模态框(Modal)</h2>
<!--bootstrap-----模态框-->
<h2>模态框(Modal)</h2>
<!-- 按钮触发模态框 -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
    登陆
</button>
<!-- 模态框(Modal) -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<!--登陆框头部-->
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    ×
                </button>
				<h4 class="modal-title" id="myModalLabel">
					添加新的智能设备
				</h4>
			</div>
			<!--登陆框中间部分(from表单)-->
			<div class="modal-body">
				<form class="form-horizontal" role="form">
					<!--用户框-->
					<div class="form-group">
						<label for="Equip_name" class="col-sm-2 control-label">设备名</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" id="Equip_name" placeholder="Equip_name" required="required">
						</div>
					</div>
					<!--密码框-->
					<div class="form-group">
						<label for="password" class="col-sm-2 control-label">类型选择</label>
						<div class="col-sm-10">
							<label class="radio-inline">
								<input type="radio" name="optionsRadiosinline" id="optionsRadios3" value="option1" checked > 电灯
							</label>
							<label class="radio-inline">
								<input type="radio" name="optionsRadiosinline" id="optionsRadios4"  value="option2"> 热水器
							</label>
							<label class="radio-inline">
								<input type="radio" name="optionsRadiosinline" id="optionsRadios4"  value="option2"> 空调
							</label>
						</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>
</div>
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

让我试试哈

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值