x
 
1
<!DOCTYPE html>
2
<title>My Example</title>
3
4
<!-- Latest compiled and minified Bootstrap CSS -->
5
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
6
7
<style>
8
body {
9
padding-top: 1em;
10
}   
11
</style> <div class="container-fluid">
12
        
13
<div class="form-group has-success">
14
<label class="col-form-label" for="username">Success</label>
15
<input type="text" class="form-control form-control-success" id="username" aria-describedby="usernameStatus">
16
<div class="form-control-feedback">Congratulations on your new username!</div>
17
</div>
18
19
<div class="form-group has-warning">
20
<label class="col-form-label" for="password">Warning</label>
21
<input type="password" class="form-control form-control-warning" id="password" aria-describedby="passwordStatus">
22
<div class="form-control-feedback">C'mon, you can do better than that username...</div>
23
</div>
24
25
<div class="form-group has-danger">
26
<label class="col-form-label" for="phone">Danger</label>
27
<input type="tel" class="form-control form-control-danger" id="phone" aria-describedby="phoneStatus">
28
<div class="form-control-feedback">That username's so bad, we can't accept it.</div>
29
</div>
30
31
</div>
32
        
33
<!-- jQuery library -->
34
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
35
36
<!-- Popper -->
37
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
38
39
<!-- Latest compiled and minified Bootstrap JavaScript -->
40
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
41
42
<!-- Initialize Bootstrap functionality -->
43
<script>
44
// Initialize tooltip component
45
$(function () {
46
  $('[data-toggle="tooltip"]').tooltip()
47
})
48
49
// Initialize popover component
50
$(function () {
51
  $('[data-toggle="popover"]').popover()
52
})
53
</script>