bootstrap 圖片:響應式與外形樣式
阿新 • • 發佈:2018-05-20
col 元素 spa .com shee 圖片大小 pre boot init
響應式是指一個網站能兼容多個終端,響應式圖片即是,圖片大小能自適應屏幕(比例不變)
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap--> <link href="__STATIC__/插件/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet"> <!-- HTML5 shim 和 Respond.js 是為了讓 IE8 支持 HTML5 元素和媒體查詢(media queries)功能 --> <!-- 警告:通過 file:// 協議(就是直接將 html 頁面拖拽到瀏覽器中)訪問頁面時 Respond.js 不起作用 --> <!--[if lt IE 9]> <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依賴 jQuery,所以必須放在前邊) --> <script src="__STATIC__/插件/jquery-3.3.1.min.js"></script> <script src="__STATIC__/插件/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script> <title>bootstrap</title> <style> </style> </head> <body> <h4>非響應式圖片</h4> <img src="__STATIC__/images/timg.jpg" > <h4>響應式圖片</h4> <!-- img-rounded:圓角 img-circle:圓形 img-thumbnail:縮略圖 --> <img src="__STATIC__/images/timg.jpg" class="img-responsive img-thumbnail"> </body> </html>
bootstrap 圖片:響應式與外形樣式