+ All Categories
Home > Software > Introduction to Bootstrap

Introduction to Bootstrap

Date post: 09-Feb-2017
Category:
Upload: designveloper
View: 81 times
Download: 0 times
Share this document with a friend
30
Mr Minh Introduction to Bootstrap
Transcript
Page 1: Introduction to Bootstrap

Mr Minh

Introduction toBootstrap

Page 2: Introduction to Bootstrap

Planning your site with mind maps Prototyping your site using mockups Bootstrap introduce and download The bootstrap grid system CSS Overview Components Javascript Effects

Agenda

Page 3: Introduction to Bootstrap

Planning your site with mind maps

http://bubbl.ushttp://www.mindmeister.com

Page 4: Introduction to Bootstrap

Prototyping your site using mockups

http://balsamiq.com/products/mockups/

Page 5: Introduction to Bootstrap

Twitter Bootstrap is a popular UI framework http://getbootstrap.com/getting-started/

Twitter Bootstrap

Page 6: Introduction to Bootstrap

● CSS resetting for cross browser compatibility● Grid scaffolding for design● Multi-screen support (responsive design)● “Mobile first”, like jQuery Mobile● And a really good looking UI framework

Features

Page 7: Introduction to Bootstrap

● JavaScript plugins○ Dialogs○ Tabs○ Alerts○ Carousel○ Tooltips○ … and more.

Features (cont.)

Page 8: Introduction to Bootstrap

1. You can customize the CSS yourself (not recommended)

2. You can use LESS to compile a BootstrapCSS version on your own3. You can just download a customized version

http://bootswatch.com/

Customization

Page 9: Introduction to Bootstrap

How to add Twitter Bootstrap

Page 10: Introduction to Bootstrap

How to add Twitter Bootstrap (cont.)

Page 11: Introduction to Bootstrap

The grid layout

Page 12: Introduction to Bootstrap

The grid (cont.)

• 960 Grid System http://960.gs/• Blue Print CSS http://www.blueprintcss.org/ • Golden Grid System http://goldengridsystem.com/

Page 13: Introduction to Bootstrap

The grid (cont.)Extra small devices Phones (<768px)

Small devices Tablets (≥768px)

Medium devices Desktops (≥992px)

Large devices Desktops (≥1200px)

Grid behavior Horizontal at all times

Collapsed to start, horizontal above breakpoints

Collapsed to start, horizontal above breakpoints

Collapsed to start, horizontal above breakpoints

Max container width

None (auto) 750px 970px 1170px

Class prefix .col-xs- .col-sm- .col-md- .col-lg-# of columns 12 12 12 12

Max column width Auto 60px 78px 95px

Gutter width 30px(15px on each side of a column)

30px(15px on each side of a column)

30px(15px on each side of a column)

30px(15px on each side of a column)

Examples http://getbootstrap.com/examples/grid/

Page 14: Introduction to Bootstrap

Bootstrap 3 features an always-responsive grid with a maximum size:

1. col-xs-[num] grids have no maximum size (fluid)2. col-sm-[num] grids resize up to 750px3. col-md-[num] grids resize up to 970px4. col-lg-[num] grids resize up to 1170px

You should choose col-md or col-lg for desktop sites.

The grid (cont.)

Page 15: Introduction to Bootstrap

How to write pages using a grid:

<!-- every row must have 12 columns --><div class="row">

<div class="col-md-4"><!-- content --

></div><!-- need to complete 8 more columns -->

</div>

The grid (cont.)

Page 16: Introduction to Bootstrap

You can also use two grid sizes for different screen sizes:

<div class="row"><div class="col-md-4 col-xs-6">

<!-- content --></div><div class="col-md-8 col-xs-6">

<!-- content --></div>

</div>

The grid (cont.)

Page 17: Introduction to Bootstrap

<table class="table"><thead><th><td>Name</td><td>Age</td></th>

</thead><tbody><tr><td>Alice</td><td>20</td></tr><tr><td>Bob</td><td>25</td></tr>

</tbody></table>

Tables

Page 18: Introduction to Bootstrap

<form role="form"><div class="form-group"><label for="exampleInputEmail1">Email address</label><input type="email" class="form-control"

id=" exampleInputEmail1" placeholder="Enter email">

</div><div class="form-group"><label

for="exampleInputPassword1">Password</label><input type="password" class="form-control"

id=" exampleInputPassword1" placeholder="Password">

</div><button type="submit" class="btn btn-

default">Submit</button></form>

Forms

Page 19: Introduction to Bootstrap

Buttons can either be button elements, links or input elements. They will all look like buttons.● For simple links, use the <a> element and

add button styling if needed.● For forms or dynamic buttons, use the button

element.

<button class="btn btn-primary">Primary</button><a href=”btn btn-primary”>Primary</a><input type=”submit class=”btn btn-primary”/>

Buttons

Page 20: Introduction to Bootstrap

● Dropdowns● Tabs● Pills● Navbars● Alerts● ListsCheck out the Bootstrap reference for more:http://getbootstrap.com/components/

Bootstrap elements

Page 21: Introduction to Bootstrap

To insert a user icon to a button, use the following syntax inline with any text:<span class="glyphicon glyphicon-user"></span>

For example, for a button with a star:<button type="button" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-star"></span>

Star</button>

Font icons

Page 22: Introduction to Bootstrap

● Glyphicons - Comes with bootstrap● Font Awesome - Recommended

○ http://fortawesome.github.io/Font-Awesome/● Fontello - Customize your font package

○ http://fontello.com/● Free icons - many of them over the internet

○ http://www.pixeden.com/media-icons/flat-design- icons-set-vol1

● Commercial icons - Shutterstock,istockphoto, etc.

Icon resources

Page 23: Introduction to Bootstrap

Resources

Page 24: Introduction to Bootstrap

http://wrapbootstrap.com

Wrap Bootstrap

Page 25: Introduction to Bootstrap

http://bootswatch.com/

Bootswatch

Page 26: Introduction to Bootstrap

http://startbootstrap.com/

Start Bootstrap

Page 27: Introduction to Bootstrap

http://lesscss.org/

LESS

Page 28: Introduction to Bootstrap

http://fortawesome.github.io/Font-Awesome/

Font Awesome

Page 29: Introduction to Bootstrap

http://fontello.com/

Fontello

Page 30: Introduction to Bootstrap

Thank You!


Recommended