Bootstrap开关问题

时间:2015-09-20 14:38:06

标签: twitter-bootstrap css3 button twitter-bootstrap-3

我正在尝试使用自举开关,但我遇到了一些问题。我在这里使用这个例子http://www.jque.re/plugins/version3/bootstrap.switch/和我正在使用的任何类,按钮保持相同的样式和非常小的尺寸,我甚至看不到ON和OFF文本。我真的不知道我做错了什么。有帮助吗?感谢

这是我的HTML:

<!DOCTYPE html>
<html lang="pt">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link rel="stylesheet" href="css/jquery-ui-1.10.1.custom.css" />
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-switch.css" rel="stylesheet">
    <link href="css/_custom.css" rel="stylesheet">   

    <script src="js/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="js/jquery-ui.js" type="text/javascript"></script>
    <script src="js/bootstrap-switch.js"></script>


    <!-- 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="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body> 
         <div class="row">
    <div class="col-lg-12">
<div class="make-switch switch-large">
    <input type="checkbox" name="my-checkbox" checked>

    <div class="make-switch" data-on="primary" data-off="info">
    <input type="checkbox" checked name="my-checkbox">

    <div id="label-switch" class="make-switch" data-on-label="SIM" data-off-label="NÃO">
    <input type="checkbox" checked name="my-checkbox">
</div>
</div>
</div>
</div></div>

  </form>

</div>  
    <script type="text/javascript">
$("[name='my-checkbox']").bootstrapSwitch();
</script>



    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>

  </body>
</html>

0 个答案:

没有答案