Bootstrap 组件练习

发布时间:2020-06-20 22:16:32 作者:SolomonT
来源:网络 阅读:299

<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>

 

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1">

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

<title>hello bootstrap</title>

<!-- 载入bootstrap压缩CSS -->

<link rel="stylesheet" href="../css/bootstrap.min.css">



</head>

<body>

<div>

<h2>你好,世界!</h2>

<!-- 载入glyphicon图标 -->

<span class="glyphicon glyphicon-search">搜索</span></br>


<span class="glyphicon glyphicon-camera">拍照</span></br>


<span class="glyphicon glyphicon-circle-arrow-down">下载</span></br>


<!-- 基本按钮显示 -->

    <button type=“button” class="btn btn-default">默认灰色按钮</button>

    <button type=“button” class="btn btn-primary">蓝色</button>

    <button type=“button” class="btn btn-info">信息</button>

    <button type=“button” class="btn btn-success">成功</button>

    <button type=“button” class="btn btn-warning">警告</button>

    <button type=“button” class="btn btn-danger">危险</button></br>


<a class="btn btn-primaty" href="#" role="button">用a标签必须确定role为button</a>


<!-- 按钮大小控制 -->

    <button type=“button” class="btn btn-default btn-lg">默认灰色按钮</button>

    <button type=“button” class="btn btn-primary">蓝色</button>

    <button type=“button” class="btn btn-info btn-sm">信息</button>

    <button type=“button” class="btn btn-success">成功</button>

    <button type=“button” class="btn btn-warning btn-xs">警告</button>

    <button type=“button” class="btn btn-danger">危险</button>

        <button type=“button” class="btn btn-link">link</button>



<!-- 按钮像父块一样大-->

    <button type=“button” class="btn btn-primary btn-lg btn-block">block level button</button>

    <button type=“button” class="btn btn-default btn-lg btn-block">block level button</button>




<!-- 按钮禁用 -->

  <button type=“button” class="btn btn-success disabled="disabled">成功</button>

    <button type=“button” class="btn btn-warning disabled="active">警告</button></br>



<!-- 图标载入按钮,看起来有图标文字的按钮 -->

 <button type=“button” class="btn btn-primary disabled="disabled"><span class="glyphicon glyphicon-play-circle

" ></span>&nbsp&nbsp 播放</button></br>



 <button type=“button” class="btn btn-primary disabled="disabled"><span class="glyphicon glyphicon-earphone

" ></span>&nbsp&nbsp打电话</button></br>


<!-- 按钮一般下拉菜单 -->

<div class="btn-group">

<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="dropdownMenu1"

aria-haspopup="false" aria-expanded="false">省份<span class="caret"></span>

</button>

    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

    <li><a href="#">浙江</a></li>

    <li class="disabled"><a href="#">江苏</a></li>

    <li><a href="#">广东</a></li>

    <li role="separator" class="divider"></li>

    <li><a href="#" onclick="window.close()">山东</a></li>

    </ul>

</div>

<!-- Single button -->

<div class="btn-group">

  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">

    Action  <span class="caret"></span>

  </button>

  <ul class="dropdown-menu">

    <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> </br>



<div class="btn-group" role="group">

<!-- <div class="btn-group-vertical" role="group"> -->

<div class="btn-group" role="toolbar">

<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" id="dropdownMenu1"

aria-haspopup="false" aria-expanded="false">省份<span class="caret"></span>

</button>

    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

    <li><a href="#">浙江</a></li>

    <li class="disabled"><a href="#">江苏</a></li>

    <li><a href="#">广东</a></li>

    <li role="separator" class="divider"></li>

    <li><a href="#" onclick="window.close()">山东</a></li>

    </ul>

</div>


<div class="btn-group" role="toolbar">

<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" id="dropdownMenu1"

aria-haspopup="false" aria-expanded="false">城市<span class="caret"></span>

</button>

    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

    <li><a href="#">杭州</a></li>

    <li class="disabled"><a href="#">宁波</a></li>

    <li><a href="#">青岛</a></li>

    <li role="separator" class="divider"></li>

    <li><a href="#" onclick="window.close()">温州</a></li>

    </ul>

</div>

<div class="btn-group" role="toolbar">

<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" id="dropdownMenu1"

aria-haspopup="false" aria-expanded="false">区域<span class="caret"></span>

</button>

    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

    <li><a href="#">西湖区</a></li>

    <li class="disabled"><a href="#">海曙区</a></li>

    <li><a href="#">崂山区</a></li>

    <li role="separator" class="divider"></li>

    <li><a href="#" onclick="window.close()">鹿城区</a></li>

    </ul>

</div>

<div class="btn-group" role="toolbar">

<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" id="dropdownMenu1"

aria-haspopup="false" aria-expanded="false">街道<span class="caret"></span>

</button>

    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

    <li><a href="#">莫干山路</a></li>

    <li class="disabled"><a href="#">宁波路</a></li>

    <li><a href="#">崂山东路</a></li>

    <li role="separator" class="divider"></li>

    <li><a href="#" onclick="window.close()">五马街</a></li>

    </ul>

</div>

</div>


<!-- 按钮分裂式下拉菜单-->


<div class="btn-group dropup">


<div class="btn-group">

  <button type="button" class="btn btn-warning">省份</button>


<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown" id="dropdownMenu1"

aria-haspopup="false" aria-expanded="false">

<span class="caret"></span>

<span class="sr-only">Toggle Dropdown</span>


</button>

    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

    <li><a href="#">浙江</a></li>

    <li class="disabled"><a href="#">江苏</a></li>

    <li><a href="#">广东</a></li>

    <li role="separator" class="divider"></li>

    <li><a href="#" onclick="window.close()">山东</a></li>

    </ul>

</div>


<div class="btn-group" role="toolbar">

  <button type="button" class="btn btn-warning">城市</button>

<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown" id="dropdownMenu1"

aria-haspopup="false" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span>


</button>

    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

    <li><a href="#">杭州</a></li>

    <li class="disabled"><a href="#">宁波</a></li>

    <li><a href="#">青岛</a></li>

    <li role="separator" class="divider"></li>

    <li><a href="#" onclick="window.close()">温州</a></li>

    </ul>

</div>

<div class="btn-group" role="toolbar">

  <button type="button" class="btn btn-warning">区域</button>

<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown" id="dropdownMenu1"

aria-haspopup="false" aria-expanded="false"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span>


</button>

    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

    <li><a href="#">西湖区</a></li>

    <li class="disabled"><a href="#">海曙区</a></li>

    <li><a href="#">崂山区</a></li>

    <li role="separator" class="divider"></li>

    <li><a href="#" onclick="window.close()">鹿城区</a></li>

    </ul>

</div>

<div class="btn-group" role="toolbar">

    <button type="button" class="btn btn-warning">街道</button>

<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

<span class="caret"></span>

<span class="sr-only">Toggle Dropdown</span>

</button>

    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

    <li><a href="#">莫干山路</a></li>

    <li class="disabled"><a href="#">宁波路</a></li>

    <li><a href="#">崂山东路</a></li>

    <li role="separator" class="divider"></li>

    <li><a href="#" onclick="window.close()">五马街</a></li>

    </ul>

</div>

</div>








</div>


</div>

<!-- 顺序载入jquery库并且加载bootstrap压缩js库 -->

<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>

<script src="../js/bootstrap.min.js"></script>


</body>

</html>  -->


推荐阅读:
  1. Bootstrap笔记
  2. 怎么使用bootstrap组件

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

bootstrap strap

上一篇:03-06-批量管理远程桌面

下一篇:windows下分页机制浅谈

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》