-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap5-alerts-for-error-warning-info-and-success.html
More file actions
138 lines (126 loc) · 4.5 KB
/
Copy pathbootstrap5-alerts-for-error-warning-info-and-success.html
File metadata and controls
138 lines (126 loc) · 4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bootstrap 5 Alerts for Error, Warning, Info, and Success</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
<style>
#alert_2 {
margin-top: 70px;
max-width: 100%;
margin-left: auto;
margin-right: auto;
}
#alert_2 .heading h1 {
text-align: center;
margin-bottom: 50px;
font-size: 30px;
text-transform: capitalize;
}
#alert_2 .alert {
padding: 0;
text-align: center;
border: 0;
border-radius: 10px;
}
#alert_2 .alert button {
background: no-repeat;
position: relative;
padding: 5px 10px;
width: fit-content;
height: auto;
background: #58151c;
color: #fff;
border-radius: 20px;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.8px;
opacity: 1;
}
#alert_2 .alert.alert-warning button {
background: #664d03;
}
#alert_2 .alert.alert-info button {
background: #055160;
}
#alert_2 .alert.alert-success button {
background: #0a3622;
}
#alert_2 .alert .text p {
margin-bottom: 10px;
}
#alert_2 .alert .text {
background: #fff;
padding: 20px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
#alert_2 .alert .icon {
padding: 10px 0;
font-size: 30px;
}
</style>
</head>
<body>
<section id="alert_2">
<div class="container">
<div class="heading">
<h1>Bootstrap 5 Alert Box</h1>
</div>
<div class="row">
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="alert alert-danger alert-dismissible fade show shadow" role="alert">
<div class="icon">
<i class="bi bi-ban"></i>
</div>
<div class="text">
<h4>Error!</h4>
<p>Lorem ipsum dolor sit amet consectetur.</p>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">Close</button>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="alert alert-warning alert-dismissible fade show shadow" role="alert">
<div class="icon">
<i class="bi bi-exclamation-triangle"></i>
</div>
<div class="text">
<h4>Warning!</h4>
<p>Lorem ipsum dolor sit amet consectetur.</p>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">Close</button>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="alert alert-info alert-dismissible fade show shadow" role="alert">
<div class="icon">
<i class="bi bi-exclamation-circle-fill"></i>
</div>
<div class="text">
<h4>Info!</h4>
<p>Lorem ipsum dolor sit amet consectetur.</p>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">Close</button>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6 col-12">
<div class="alert alert-success alert-dismissible fade show shadow" role="alert">
<div class="icon">
<i class="bi bi-check-circle-fill"></i>
</div>
<div class="text">
<h4>Success!</h4>
<p>Lorem ipsum dolor sit amet consectetur.</p>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">Close</button>
</div>
</div>
</div>
</div>
</div>
</section>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>