Skip to content

Instantly share code, notes, and snippets.

@devils-ey3
Created May 19, 2018 09:36
Show Gist options
  • Save devils-ey3/872ff6af2f132d66d7cc2c75b57104bf to your computer and use it in GitHub Desktop.
Save devils-ey3/872ff6af2f132d66d7cc2c75b57104bf to your computer and use it in GitHub Desktop.
Bootstrap Cheat Sheet
<!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">
<title>Bootstrap Cheat Sheet</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<style>
.navbar{
margin-bottom:0;
border-radius:0;
}
</style>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Bootstrap CheatSheet</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<!-- JUMBOTRON -->
<div class="jumbotron text-center">
<div class="container">
<h1>Welcome To My Website</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
<a href="#" class="btn btn-primary">Read More</a>
</div>
</div>
<!-- TYPOGRAPHY -->
<div class="container">
<h1 class="page-header">Hello, world! <small>Secondary text</small></h1>
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.</p>
<p><mark>Lorem ipsum dolor sit amet</mark>, consectetur adipisicing elit, sed do eiusmod
tempor <del>incididunt ut labore</del> et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation <u>ullamco laboris nisi</u> ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<hr>
<!-- ALIGNMENT & TRANSFORMATION-->
<p class="text-left text-lowercase">Left aligned text.</p>
<p class="text-center text-uppercase">Center aligned text.</p>
<p class="text-right text-capitalize">Right aligned text.</p>
<p class="text-justify">Justified text.</p>
<p class="text-nowrap">No wrap text.</p>
<!-- QUICK FLOATS -->
<div class="pull-right">Div floated to right</div>
<div class="pull-left">Div floated to left</div>
<!-- CLEAR FLOAT -->
<div class="clearfix"></div>
<hr>
<!-- BLOCKQUOTE -->
<blockquote class="blockquote-reverse">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<footer>Quote by <cite title="John Doe">John Doe</cite></footer>
</blockquote>
<hr>
<!-- LISTS -->
<ul class="list-unstyled">
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
<li>Item Four</li>
</ul>
<ul class="list-inline">
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
<li>Item Four</li>
</ul>
<!-- CODE -->
<code>&lt;h1&gt;Heading Text&lt;/h1&gt;</code>
<br>
Change directory with<kbd>cd</kbd>
<br>
To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd>
<hr>
<!-- CONTEXTUAL COLORS -->
<p class="text-primary">Hello World</p>
<p class="text-success">Hello World</p>
<p class="text-info">Hello World</p>
<p class="text-warning">Hello World</p>
<p class="text-danger">Hello World</p>
<p class="text-muted">Hello World</p>
<!-- CONTEXTUAL BACKGROUND COLORS -->
<p class="bg-primary">Hello World</p>
<p class="bg-success">Hello World</p>
<p class="bg-info">Hello World</p>
<p class="bg-warning">Hello World</p>
<p class="bg-danger">Hello World</p>
<p class="bg-muted">Hello World</p>
</div>
<hr>
<!-- BUTTONS -->
<div class="container">
<button class="btn btn-default">Button</button>
<a href="#" class="btn btn-default" role="button">Link</a>
<input type="submit" class="btn btn-default" value="Submit">
<br>
<!-- CONTEXTUAL BUTTONS -->
<button class="btn btn-default">Default</button>
<button class="btn btn-primary">Primary</button>
<button class="btn btn-success">Success</button>
<button class="btn btn-info">Info</button>
<button class="btn btn-warning">Warnig</button>
<button class="btn btn-danger">Delete</button>
<button class="btn btn-link">Link</button>
<br>
<!-- BUTTON SIZES -->
<button class="btn btn-default btn-lg">Default</button>
<button class="btn btn-default">Default</button>
<button class="btn btn-primary btn-sm">Default</button>
<button class="btn btn-default btn-xs" disabled="disabled">Default</button>
</div>
<hr>
<!-- FORMS -->
<div class="container">
<form>
<div class="form-group">
<label>Name</label>
<input type="text" class="form-control" placeholder="Add Name">
</div>
<div class="form-group">
<label>Email</label>
<input type="email" class="form-control" placeholder="Add Email">
</div>
<div class="form-group">
<label>Message</label>
<textarea class="form-control" placeholder="Add Message"></textarea>
</div>
<div class="form-group">
<label>Gender</label>
<select class="form-control">
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select>
</div>
<div class="form-group">
<label>Upload File</label>
<input type="file">
<p class="help-block">Only png and jpg allowed</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Check me out
</label>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<hr>
<!-- INLINE FORM -->
<form class="form-inline">
<div class="form-group">
<label>Email</label>
<input type="email" class="form-control" placeholder="Email">
</div>
<div class="form-group">
<label>Password</label>
<input type="password" class="form-control" placeholder="Password">
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
<button type="submit" class="btn btn-default">Login</button>
</form>
</div>
</div>
<hr>
<!-- TABLES -->
<div class="container">
<table class="table table-striped table-bordered table-hover table-condensed">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr class="danger">
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>24</td>
</tr>
<tr class="success">
<td>John</td>
<td>Doe</td>
<td>34</td>
</tr>
<tr>
<td>Stephanie</td>
<td>Landon</td>
<td>47</td>
</tr>
<tr>
<td>Mike</td>
<td>Johnson</td>
<td>19</td>
</tr>
</table>
</div>
<hr>
<!-- LIST GROUP -->
<div class="container">
<ul class="list-group">
<li class="list-group-item">Item One</li>
<li class="list-group-item">Item Two</li>
<li class="list-group-item">Item Three</li>
<li class="list-group-item">Item Four</li>
</ul>
<div class="list-group">
<a href="#" class="list-group-item active">Item One</a>
<a href="#" class="list-group-item">Item Two</a>
<a href="#" class="list-group-item list-group-item-success">Item Three</a>
<a href="#" class="list-group-item disabled">Item Four</a>
</div>
</div>
<div class="container">
<!-- PANELS -->
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Panel title</h3>
</div>
<div class="panel-body">
Panel content
</div>
<div class="panel-footer">Panel Footer</div>
</div>
<hr>
<!-- WELLS -->
<div class="well"> Hello World</div>
<div class="well well-lg"> Hello World</div>
<div class="well well-sm"> Hello World</div>
<hr>
<!-- ALERTS -->
<div class="alert alert-success" role="alert">A success alert</div>
<div class="alert alert-info" role="alert">An info alert</div>
<div class="alert alert-warning" role="alert">A warning alert</div>
<div class="alert alert-danger" role="alert">A danger alert</div>
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span>&times;</span></button>
You can close this alert
</div>
<!-- PROGRESS BARS -->
<div class="progress">
<div class="progress-bar progress-bar-success progress-bar-striped active" style="width:50%;">
50%
</div>
</div>
<hr>
<!-- LABELS -->
<span class="label label-default">Default</span>
<h1>Hello <span class="label label-primary">Primary</span></h1>
<span class="label label-success">Success</span>
<span class="label label-info">Info</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
<!-- BADGES -->
<a href="#">Inbox <span class="badge">50</span></a>
<button class="btn btn-primary" type="button">
Messages <span class="badge">2</span>
</button>
</div>
<!-- IMAGES -->
<div class="container">
<img class="thumbnail" src="https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=350&h=150">
<img class="img-rounded" src="https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=350&h=150"><br><br>
<img class="img-circle" src="https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=350&h=150">
</div>
<hr>
<!-- GRIDS -->
<div class="container">
<div class="row">
<div class="col-md-8 col-sm-8 col-xs-8">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="col-md-4 col-sm-4 col-xs-4">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et </p>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et </p>
</div>
<div class="col-md-3">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et </p>
</div>
<div class="col-md-3">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et </p>
</div>
<div class="col-md-3">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et </p>
</div>
</div>
<br>
<div class="row">
<div class="col-md-6">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="col-md-6">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et </p>
</div>
</div>
<div class="row">
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
<div class="col-md-1">
<h3>Box</h3>
</div>
</div>
</div>
<div style="height:400px"></div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment