Skip to content

Instantly share code, notes, and snippets.

@minhphong306
Created February 10, 2018 03:36
Show Gist options
  • Save minhphong306/1195329c1a2b9ad3991abdf2568eaacf to your computer and use it in GitHub Desktop.
Save minhphong306/1195329c1a2b9ad3991abdf2568eaacf to your computer and use it in GitHub Desktop.
Bootstrap useful snippet
// Table
<table class="table table-hover">
<thead>
<tr>
<th>Tiêu chí</th>
<th>Kết quả</th>
</tr>
</thead>
<tbody>
<tr>
<td>Số từ</td>
<td>123</td>
</tr>
</tbody>
</table>
// Form with add on
<form method="POST" role="form">
<div class="form-group">
<label for="str_analysis">String analysis</label>
<div class="input-group">
<div class="input-group-addon">
<span aria-hidden="true" class="glyphicon glyphicon-console"></span>
</div>
<input ng-model="str_analysis" id="str_analysis" type="text" placeholder="Nhập vào string cần phân tích" required="required" autofocus="autofocus" class="form-control">
<span class="input-group-btn">
<button ng-click="analysis()" type="submit" class="btn btn-primary">
<span aria-hidden="true" class="glyphicon glyphicon-search"></span>
Phân tích
</button>
</span>
</div>
</div>
</form>
// Horizontal form
<form class="form-horizontal">
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Sign in</button>
</div>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment