本文實例為大家分享了Bootstrap基本模板的具體代碼,供大家參考,具體內容如下
<!-- 聲明文檔類型 為 html5 --><!DOCTYPE html><!-- 聲明頁面內容主要為 中文簡體 --><html lang="zh-CN"><head><!-- 聲明頁面編碼 為 utf-8 --><meta charset="utf-8"><!-- X-UA-Compatible 瀏覽器兼容模式 這是個是IE8的專用標記,用來指定IE8瀏覽器去模擬某個特定版本的IE瀏覽器的渲染方式(比如人見人煩的IE6),以此來解決部分兼容問題 --><!-- 詳情見 http://www.cnblogs.com/lovecode/articles/3377505.html --><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- 申明viewport 視口屬性設置,只有在移動端才識別其中屬性有width = device-width 視口寬度等于 設備寬度initial-scale = 1.0 初始化 縮放比為1:1 也就是等比顯示還有其他的屬性:user-scalable = 0 ;可選值1,0, 或 yes, no用戶是否允許縮放。maximum = 1.0 最大縮放比minimum = 1.0 最小縮放比--><meta name="viewport" content="width=device-width, initial-scale=1"><!-- 上述3個meta標簽*必須*放在最前面,任何其他內容都*必須*跟隨其后! --><title>Bootstrap 模板</title><!-- Bootstrap --><link href="lib/bootstrap/css/bootstrap.css" rel="stylesheet"><!-- respond 異步加載的 本地打開 不生效 需要使用服務器,例如在 Apache 上打開--><!-- 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:// --><!-- 只有IE才識別的注釋 --><!-- 不支持h5標簽的瀏覽器需要引用 html5shiv.js 包 --><!-- 不支持媒體查詢的瀏覽器 需引入 respond.js 包 --><!--[if lt IE 9]><script src="lib/html5shiv/html5shiv.min.js"></script><script src="lib/respond/respond.js"></script><![endif]--></head><body><!-- 刪掉下面的標題 就可以填寫內容了 --><h1>你好,世界!</h1><!-- 填寫內容區 --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) bootstrap基于jQuery 所以jQuery要先引入 --><script src="lib/jquery/jquery.js"></script><!-- Include all compiled plugins (below), or include individual files as needed --><script src="lib/bootstrap/js/bootstrap.js"></script></body></html>
所有包從本地服務器上引用,不使用CDN
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持武林網。
新聞熱點
疑難解答