JS Bin使用bootstrap及Jquery

Posted 小海哥的号

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JS Bin使用bootstrap及Jquery相关的知识,希望对你有一定的参考价值。

版权声明

本文首发自微信公共帐号:

小海哥的号(here_xulh)

无需授权即可转载,甚至无需保留以上版权声明



Bootstrap应用,下载并引用(方法一)

JS Bin使用bootstrap及Jquery

JS Bin使用bootstrap及Jquery

Bootstrap应用,在线引用第三方包(方法二)

JS Bin使用bootstrap及Jquery

JS Bin使用bootstrap及Jquery
JS Bin使用bootstrap及Jquery

  • 三个必要引入文件JS Bin使用bootstrap及Jquery

  • html文件结构解读

 
   
   
 
  1. <!--html文件声明-->

  2. <!DOCTYPE html>

  3. <html>

  4. <head>

  5.  <!--编码字符声明-->

  6.  <meta charset="utf-8">

  7.  <!--浏览器兼容声明-->

  8.  <meta http-equiv="X-UA-Compatiable" content="IE=edge">

  9.  <!--跨屏自适应声明-->

  10.  <meta name="viewport" content="width=device-width">

  11.  <title>JS Bin</title>

  12.  <link href="https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet">

  13.  <script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>

  14.  <script src="https://code.jquery.com/jquery-3.1.0.js"></script>

  15. </head>

  16. <body>

  17.  <h1>Bootstrp</h1>

  18.  <a href="#">小海哥非常帅</a>

  19.  <a href="#" class="btn btn-default">小海哥非常帅</a>

  20. </body>

  21. </html>

JS Bin使用bootstrap及Jquery

jsbin AJAX

  • 先准备AJAX 相应代码片段 
    JS Bin使用bootstrap及Jquery

  • 需要保存代码片段JS Bin使用bootstrap及Jquery

  • 保存代码片段JS Bin使用bootstrap及Jquery* 再次重新打开JS Bin使用bootstrap及Jquery

 
   
   
 
  1. <!DOCTYPE html>

  2. <html>

  3. <head>

  4.  <meta charset="utf-8">

  5.  <meta name="viewport" content="width=device-width">

  6.  <title>JS Bin</title>

  7. </head>

  8. <body>

  9. <script src="https://code.jquery.com/jquery-3.1.0.js"></script>

  10. </body>

  11. </html>

  12. '

  13. '

  14. $.ajax({

  15. //url: 'https://jsbin.com/hemawu/3/edit?js',

  16. url: 'https://jsbin.com/hemawu/3.js',

  17. dataType: 'json',

  18. success: function(data) {

  19. alert(data.author + ' - ' + data.bookname);

  20. }

  21. });

  • 进行测试 
    JS Bin使用bootstrap及Jquery

  • 运行js 
    JS Bin使用bootstrap及Jquery

bootstrap自适应容器设置

 
   
   
 
  1. <!DOCTYPE html>

  2. <html>

  3. <head>

  4.  <!--编码字符声明-->

  5.  <meta charset="utf-8">

  6.  <!--浏览器兼容声明-->

  7.  <meta http-equiv="X-UA-Compatiable" content="IE=edge">

  8.  <!--跨屏自适应声明-->

  9.  <meta name="viewport" content="width=device-width">

  10.  <title>JS Bin</title>

  11.  <link href="https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet">

  12.  <script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>

  13.  <script src="https://code.jquery.com/jquery-3.1.0.js"></script>

  14. </head>

  15. <body>

  16.  <h1>Bootstrp</h1>

  17.  <a href="#">小海哥非常帅</a>

  18.  <a href="#" class="btn btn-default">小海哥非常帅</a>

  19.  <div class="container">

  20.    <div class="row">

  21.      <div class="col-md-6" style="border:2px solid #000">

  22.        <p>In the future, everyone will be famous for 15 minutes. I'm bored with that line. I never use it anymore. My new line is 'In 15 minutes everyone will be famous.'Don't pay any attention to what they write about you. Just measure it in inches.</p>

  23.      </div>

  24.      <div class="col-md-6" style="border:2px solid #000">

  25.        <p>In the future, everyone will be famous for 15 minutes. I'm bored with that line. I never use it anymore. My new line is 'In 15 minutes everyone will be famous.'Don't pay any attention to what they write about you. Just measure it in inches.</p>

  26.      </div>

  27.    </div>

  28.  </div>

  29.  <div style="border:1px solid #000">

  30.    <p>In the future, everyone will be famous for 15 minutes. I'm bored with that line. I never use it anymore. My new line is 'In 15 minutes everyone will be famous.'Don't pay any attention to what they write about you. Just measure it in inches.</p>

  31.  </div>

  32. </body>

  33. </html>

JS Bin使用bootstrap及Jquery

自适应

 
   
   
 
  1. <!DOCTYPE html>

  2. <html>

  3. <head>

  4.  <!--编码字符声明-->

  5.  <meta charset="utf-8">

  6.  <!--浏览器兼容声明-->

  7.  <meta http-equiv="X-UA-Compatiable" content="IE=edge">

  8.  <!--跨屏自适应声明-->

  9.  <meta name="viewport" content="width=device-width">

  10.  <title>JS Bin</title>

  11.  <link href="https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet">

  12.  <script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>

  13.  <script src="https://code.jquery.com/jquery-3.1.0.js"></script>

  14. </head>

  15. <body>

  16.  <h1>Bootstrp</h1>

  17.  <a href="#">小海哥非常帅</a>

  18.  <a href="#" class="btn btn-default">小海哥非常帅</a>

  19.  <div class="container">

  20.    <div class="row">

  21.      <div class="col-md-6" style="border:2px solid #000">

  22.        <p>In the future, everyone will be famous for 15 minutes. I'm bored with that line. I never use it anymore. My new line is 'In 15 minutes everyone will be famous.'Don't pay any attention to what they write about you. Just measure it in inches.</p>

  23.      </div>

  24.      <div class="col-md-6" style="border:2px solid #000">

  25.        <p>In the future, everyone will be famous for 15 minutes. I'm bored with that line. I never use it anymore. My new line is 'In 15 minutes everyone will be famous.'Don't pay any attention to what they write about you. Just measure it in inches.</p>

  26.      </div>

  27.    </div>

  28.    <div class="row">

  29.      <div class="col-lg-2 col-md-4 col-sm-12" style="border:2px solid #000">

  30.        <p>In the future, everyone will be famous for 15 minutes. I'm bored with that line. I never use it anymore. My new line is 'In 15 minutes everyone will be famous.'Don't pay any attention to what they write about you. Just measure it in inches.</p>

  31.      </div>

  32.      <div class="col-lg-2 col-md-4 col-sm-12" style="border:2px solid #000">

  33.        <p>In the future, everyone will be famous for 15 minutes. I'm bored with that line. I never use it anymore. My new line is 'In 15 minutes everyone will be famous.'Don't pay any attention to what they write about you. Just measure it in inches.</p>

  34.      </div>

  35.      <div class="col-lg-2 col-md-4 col-sm-12" style="border:2px solid #000">

  36.        <p>In the future, everyone will be famous for 15 minutes. I'm bored with that line. I never use it anymore. My new line is 'In 15 minutes everyone will be famous.'Don't pay any attention to what they write about you. Just measure it in inches.</p>

  37.      </div>

  38.    </div>

  39.    <div style="border:1px solid #000">

  40.      <p>In the future, everyone will be famous for 15 minutes. I'm bored with that line. I never use it anymore. My new line is 'In 15 minutes everyone will be famous.'Don't pay any attention to what they write about you. Just measure it in inches.</p>

  41.    </div>

  42. </body>

  43. </html>

JS Bin使用bootstrap及Jquery

===================()===================

ID:herexu

以磨砂纸的方式在打磨桌椅多年始终造不出桌椅后,再以不要脸的姿态开启007不写就出局之路。

小海哥,五年的JAVA开发,一年的产品经理,前湖人的伪球迷,现勇士的伪球迷,篮球嘴炮党。

这里除了脸,啥都有。

可以在微信后台回复“不要脸”可以与我互动




以上是关于JS Bin使用bootstrap及Jquery的主要内容,如果未能解决你的问题,请参考以下文章

Prototype与Bootstrap冲突问题及解决

vue使用一些外部插件及样式的配置

taginput ,complete使用笔记

BootStrap基础

Bootstrap和jquery有冲突吗

Bootstrap简介