bootstrap魔太框大小
2018-07-19 17:59:21 qq_38313548 阅读数 106

1.注意:一定要引入bootstrap文件,这个在新的bootstrap中已经下架。

<fieldset style="padding:.35em .625em .75em;margin:0 2px;border:1px solid silver">
    <legend style="padding:.5em;border:0;width:auto">辅助框标题</legend>
        
       辅助框内的内容
    
</fieldset>

2.效果如下:

3.更多元素请查看   bootstrap中文网

2016-12-05 21:17:00 weixin_33735077 阅读数 247
http://v3.bootcss.com/javascript/#modals 参考bootstrap官网 模态框
做php后端 前端一直不行,但是很多时候 用到ajax都要用到弹框,一直在代码里面找别人弹框来用,终于发现个现成的 ,bootstrap代码复制过来就可以弹框了,对于做后端的,真是太好了。

<!
DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap 101 Template</title> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> <!-- Button trigger modal --> <button type="button" class="btn btn-primary " data-toggle="modal" data-target="#myModal"> Launch demo modal </button> <!-- Modal --> <div class="modal " id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">x</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="myModalLabel">Modal title</h4> </div> <div class="modal-body"> <form role="form"> <div class="form-group"> <label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter 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">关闭</button> <button type="button" class="btn btn-primary submit">保存</button> </div> </div> </div> </div> </body> </html> <script type="text/javascript"> $(".submit").click(function(){ alert(4444444444); }) </script>

 

2019-01-28 21:49:53 chengqiuming 阅读数 95

一 警示框

1 代码

<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>警示框</title>
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
<h2>默认警示框</h2>
<div class="alert alert-success" role="alert">恭喜您操作成功!</div>
<div class="alert alert-info" role="alert">请输入正确的密码</div>
<div class="alert alert-warning" role="alert">您已操作失败两次,还有最后一次机会</div>
<div class="alert alert-danger" role="alert">对不起,您输入的密码有误</div>

<h2>可关闭的警示框</h2>
<div class="alert alert-success alert-dismissable" role="alert">
    <button class="close" type="button" data-dismiss="alert">&times;</button>
    恭喜您操作成功!
</div>
<div class="alert alert-info alert-dismissable" role="alert">
    <button class="close" type="button" data-dismiss="alert">&times;</button>
    请输入正确的密码
</div>
<div class="alert alert-warning alert-dismissable" role="alert">
    <button class="close" type="button" data-dismiss="alert">&times;</button>
    您已操作失败两次,还有最后一次机会
</div>
<div class="alert alert-danger alert-dismissable" role="alert">
    <button class="close" type="button" data-dismiss="alert">&times;</button>
    对不起,您输入的密码有误
</div>

<h2>警示框的链接</h2>
<div class="alert alert-success" role="alert">
    <strong>Well done!</strong>
    You successfully read
    <a href="#" class="alert-link">this important alert message</a>
    .
</div>
<div class="alert alert-info" role="alert">
    <strong>Heads up!</strong>
    This
    <a href="#" class="alert-link">alert needs your attention</a>
    , but it's not super important.
</div>
<div class="alert alert-warning" role="alert">
    <strong>Warning!</strong>
    Better check yourself, you're
    <a href="#" class="alert-link">not looking too good</a>
    .
</div>
<div class="alert alert-danger" role="alert">
    <strong>Oh snap!</strong>
    <a href="#" class="alert-link">Change a few things up</a>
    and try submitting again.
</div>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</body>
</html>

2 效果

二 警示框——默认警示框

1 代码

<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>警示框--默认警示框</title>
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
<div class="alert alert-success" role="alert">恭喜您操作成功!</div>
<div class="alert alert-info" role="alert">请输入正确的密码</div>
<div class="alert alert-warning" role="alert">您已操作失败两次,还有最后一次机会</div>
<div class="alert alert-danger" role="alert">对不起,您输入的密码有误</div>
<br/><br/>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</body>
</html>

2 效果

三 警示框——可关闭警示框

1 代码

<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>警示框--可关闭的警示框</title>
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
<div class="alert alert-success alert-dismissable" role="alert">
    <button class="close" type="button" data-dismiss="alert">&times;</button>
    恭喜您操作成功!
</div>
<div class="alert alert-info alert-dismissable" role="alert">
    <button class="close" type="button" data-dismiss="alert">&times;</button>
    请输入正确的密码
</div>
<div class="alert alert-warning alert-dismissable" role="alert">
    <button class="close" type="button" data-dismiss="alert">&times;</button>
    您已操作失败两次,还有最后一次机会
</div>
<div class="alert alert-danger alert-dismissable" role="alert">
    <button class="close" type="button" data-dismiss="alert">&times;</button>
    对不起,您输入的密码有误
</div>
<script src="https://www.imooc.com/static/lib/jquery/1.9.1/jquery.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</body>
</html>

2 效果

四 警示框——警示框的链接

1 代码

<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>警示框--警示框的链接</title>
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
<div class="alert alert-success" role="alert">
    <strong>Well done!</strong>
    You successfully read
    <a href="#" class="alert-link">this important alert message</a>
    .
</div>
<div class="alert alert-info" role="alert">
    <strong>Heads up!</strong>
    This
    <a href="#" class="alert-link">alert needs your attention</a>
    , but it's not super important.
</div>

<script src="https://www.imooc.com/static/lib/jquery/1.9.1/jquery.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</body>
</html>

2 效果

2019-06-20 15:44:49 WXN069 阅读数 88
<%--
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>

    <link rel="stylesheet" type="text/css" href="../bootstorp/css/bootstrap.css">
    <script type="text/javascript" src="../js/jquery-2.1.4.js"></script>
    <script type="text/javascript" src="../bootstorp/js/bootstrap.js"></script>
</head>
<body>
<script>
    $(function(){
        var j_all_area = $("#sel_all_area"), j_selected_areas = $("#sel_selected_areas");
        $("#btn_select_all_area").click(function(){
            var selectedAreaArray = [];
            j_all_area.find("option").each(function(i){
                selectedAreaArray[i] = $(this).val();
                $(this).appendTo(j_selected_areas);
            });
            doSubmit('add',selectedAreaArray.toString());
            return false;
        });
        $("#btn_choose_selected_area").click(function(){
            var selectedAreaArray = [];
            j_all_area.find("option:selected").each(function(i){
                selectedAreaArray[i] = $(this).val();
                $(this).appendTo(j_selected_areas);
            });
            doSubmit('add',selectedAreaArray.toString());
            return false;
        });
        $("#btn_remove_selected_area").click(function(){
            var selectedAreaArray = [];
            j_selected_areas.find("option:selected").each(function(i){
                selectedAreaArray[i] = $(this).val();
                 $(this).appendTo(j_all_area);
            });
            doSubmit('del',selectedAreaArray.toString());
            return false;
        });
        $("#btn_remove_all_area").click(function(){
            var selectedAreaArray = [];
            j_selected_areas.find("option").each(function(i){
                selectedAreaArray[i] = $(this).val();
                 $(this).appendTo(j_all_area);
            });
            doSubmit('del',selectedAreaArray.toString());
            return false;
        });

    })

    function doSubmit(select_type,roleids){
        var userid = $("#userid").val();
        $.post("doroledefine",{userid:userid,roleids:roleids,type:select_type},function(result){
            if (result == "error") {
                layer.msg('更新失败!', {
                    icon: 2
                })
            }else{
                initParams();
                layer.msg('更新成功!', {
                    icon: 1
                })
            }
        });
    }

</script>

<fieldset>
    <input type="hidden" name="userid" value="${userid }" id="userid"/>
    <table class="table table-bordered dchannel-table">
        <tbody>
        <tr class="item-default">
            <td align="right" style="width: 50%;">
                <select id="sel_all_area" multiple="multiple" size="10" style="width:100%;">
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                </select>
            </td>
            <td style="width: 50px;" valign="middle">
                <button type="button" class="btn btn-default btn-small" id="btn_select_all_area"><span class="glyphicon glyphicon-forward"></span></button>
                <button type="button" class="btn btn-default btn-small" id="btn_choose_selected_area"><span class="glyphicon glyphicon-chevron-right"></span></button>
                <button type="button" class="btn btn-default btn-small" id="btn_remove_selected_area"><span class="glyphicon glyphicon-chevron-left"></span></button>
                <button type="button" class="btn btn-default btn-small" id="btn_remove_all_area"><span class="glyphicon glyphicon-backward"></span></button>
            </td>
            <td style="width: 50%;">
                <select id="sel_selected_areas"  multiple="multiple" size="10" style="width:100%;">
                
                </select>
            </td>
        </tr>
        </tbody>
    </table>
</fieldset>
</body>
</html>

2016-07-21 17:28:01 xunbaogang 阅读数 939
基本折叠框
    <a class="btn btn-primary" role="button" data-toggle="collapse" href="#collapseExample"  aria-expanded="false" aria-controls="collapseExample">
      Link with href
    </a>
    <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
      Button with data-target
    </button>
    <div class="collapse" id="collapseExample">
      <div class="well">
        ...
      </div>
    </div>




复杂折叠框
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingOne">
      <h4 class="panel-title">
        <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
          Collapsible Group Item #1
        </a>
      </h4>
    </div>
    <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
      <div class="panel-body">
       1
      </div>
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingTwo">
      <h4 class="panel-title">
        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
          Collapsible Group Item #2
        </a>
      </h4>
    </div>
    <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
      <div class="panel-body">
        2
      </div>
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingThree">
      <h4 class="panel-title">
        <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
          Collapsible Group Item #3
        </a>
      </h4>
    </div>
    <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
      <div class="panel-body">
        3
      </div>
    </div>
  </div>
</div>





bootstrap警示框

阅读数 481

BootStrap 模拟框

阅读数 1511

Bootstrap 警示框

阅读数 47

Bootstrap 警示框

阅读数 802

没有更多推荐了,返回首页