<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Placement of Bootstrap Toasts</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script> <script> $(document).ready(function(){ $(".toast").toast({ autohide: false }); }); </script> </head> <body> <div class="m-4"> <p><strong>Note:</strong> To make the toast visible, you need to add the .show class, which will display the toast. Additionally, applying the .fade class to the toast will create a fade transition effect using CSS. By default, the toast is initially hidden until the necessary classes are adde</p> <div class="toast-container" style="position: absolute; top: 10px; right: 10px;"> <div class="toast fade show"> <div class="toast-header"> <strong class="me-auto"><i class="bi-globe"></i> Hello, world!</strong> <small>just now</small> <button type="button" class="btn-close" data-bs-dismiss="toast"></button> </div> <div class="toast-body"> This is a text. </div> </div> <div class="toast fade show"> <div class="toast-header"> <strong class="me-auto"><i class="bi-globe"></i> Hello, world!</strong> <small>5 seconds ago</small> <button type="button" class="btn-close" data-bs-dismiss="toast"></button> </div> <div class="toast-body"> See? This is another text. </div> </div> </div> </div> </body> </html>