使用BootStrap進行開發
開始(環境)
-
新建ASP.NET5 Empty、Web API或WebSite的項目。Bootstrap會自動加進項目中。
如果沒有加入,可在bower.js中的依賴項中加入bootstrap的內容。
-
使用以下工具進行安裝
Bower:
bower install bootstrap
NPM:
npm install bootstrap
NuGet:
install-package bootstrap
-
在html頁面中,加入對BootStrap的css和js的引用。
新建項目
在wwwroot中自動添加對bootstrap的支持。
如果wwwroot中沒有,則可以在bower.js中,添加對bootstrap的支持。
並對bower任務運行。
具體開發時,在_layout.cshtml頁面中添加對bootstrap的css和js的引用。
怎么用BootStrap進行開發
一些模板的使用。
Grids
Jumbotron
Buttons
Badges
<span class="badge">27</span>
Alerts
Navbars and Menus
Additional Elements
http://getbootstrap.com/examples/theme/
More Themes
s
http://getbootstrap.com/examples/dashboard/.
JavaScript
http://getbootstrap.com/javascript/.
需要在實際開發中,針對需求選擇使用什么樣的模板。