readme
This commit is contained in:
parent
41c8a240cc
commit
92166b2989
37
Bootstrap/README.md
Normal file
37
Bootstrap/README.md
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# BootStrap
|
||||||
|
## 介紹
|
||||||
|
### Bootstrap是一個由HTML、CSS和JavaScript寫成的前端框架,核心的設計目標是達成RWD響應式與行動優先,也就是讓你的網站排版可以自動適應螢幕大小。 它預先做好一套網站的基礎建設,讓你能在框架的基礎上進行開發,不需要再去煩惱瑣碎的設定。
|
||||||
|
### *懶人包:當個快樂的套模仔
|
||||||
|
|
||||||
|
|
||||||
|
### 去BootStrap找一個自己喜歡的 [Bootstrap](https://startbootstrap.com/)
|
||||||
|
#### 下載後將資料夾的assets、css、js等資料夾去放在static
|
||||||
|
![](http://140.125.21.65:8418/Education/Frontend/raw/branch/master/%E5%89%8D%E7%AB%AF_%E5%9F%BA%E7%A4%8EHTML/static/Img/%E5%9C%96%E7%89%875.png)
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/Education/Frontend/raw/branch/master/%E5%89%8D%E7%AB%AF_%E5%9F%BA%E7%A4%8EHTML/static/Img/%E5%9C%96%E7%89%876.png)
|
||||||
|
|
||||||
|
### 主要注意到Flask是用templates架構,所以內部匯入css及js的方式要改
|
||||||
|
原 css匯入 :
|
||||||
|
```
|
||||||
|
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
|
||||||
|
<link href="css/styles.css" rel="stylesheet" />
|
||||||
|
```
|
||||||
|
改 css匯入:
|
||||||
|
```
|
||||||
|
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='assets/favicon.ico') }}">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||||
|
```
|
||||||
|
原 js匯入:
|
||||||
|
```
|
||||||
|
<script src="js/scripts.js"></script>
|
||||||
|
<script src="https://cdn.startbootstrap.com/sb-forms-latest.js"></script>
|
||||||
|
```
|
||||||
|
改 js匯入:
|
||||||
|
```
|
||||||
|
<script src="{{ url_for('static', filename='js/scripts.js') }}"></script>
|
||||||
|
<script src="https://cdn.startbootstrap.com/sb-forms-latest.js"></script>
|
||||||
|
```
|
||||||
|
### 啟動後即可獲取美化過後的網頁
|
||||||
|
![](http://140.125.21.65:8418/Education/Frontend/raw/branch/master/%E5%89%8D%E7%AB%AF_%E5%9F%BA%E7%A4%8EHTML/static/Img/%E5%9C%96%E7%89%877.png)
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/Education/Frontend/raw/branch/master/%E5%89%8D%E7%AB%AF_%E5%9F%BA%E7%A4%8EHTML/static/Img/%E5%9C%96%E7%89%878.png)
|
Loading…
Reference in New Issue
Block a user