BootStrap笔记-BootStrap的安装与使用
生活随笔
收集整理的這篇文章主要介紹了
BootStrap笔记-BootStrap的安装与使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
下載BootStrap,如4.4.1
?如下代碼;
<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>CN_TEST1</title><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><!-- bootstrap css核心文件--><link rel="stylesheet" href="bootstrap-4.4.1-dist/css/bootstrap.min.css"> <!-- bootstrap使用到了jquery,需要提前引用--><script src="js/jquery-3.5.1.min.js"></script> <!-- 彈窗、提示、下拉菜單--><script src="bootstrap-4.4.1-dist/js/bootstrap.bundle.js"></script> <!-- bootstrap核心文件--><script src="bootstrap-4.4.1-dist/js/bootstrap.min.js"></script></head> <body> <!-- <div class="container" style="background: orangered">--> <!-- <h1>class = container</h1>--> <!-- <p>中文,,,English</p>--> <!-- </div>--><div class="container-fluid" style="background: orangered"><h1>class = container</h1><p>中文,,,English</p></div> </body> </html>其中:
<div class="container-fluid" style="background: orangered"><h1>class = container</h1><p>中文,,,English</p></div>對應的效果:
?其中
<div class="container" style="background: orangered"><h1>class = container</h1><p>中文,,,English</p></div>對應的效果:
解釋下:
①meta中的width=device-width代表寬度是設備的寬度也就是視口=布局=理想視口;
②initial-scale=1代表初始的放縮比例為1;
③shrink-to-file=no是在IOS9中上面2條才能起作用,其他的設備可以忽略。
?
總結
以上是生活随笔為你收集整理的BootStrap笔记-BootStrap的安装与使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: t4b代码生成_用T4模板实现简单的代码
- 下一篇: c语言转义字符%,c语言转义字符