Bootstrap class: .alert-dismissible

Do not have time to learn all the Bootstrap classes?

Try drag & drop Bootstrap builder

<div class="alert alert-warning alert-dismissible fade show" role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close">
    <span aria-hidden="true">&times;</span>
  </button>
  <strong>Holy guacamole!</strong> You should check in on some of those fields below.
</div>

Preview

Sass source

/* _alert.scss:29 */
.alert-dismissible {
  padding-right: ($close-font-size + $alert-padding-x * 2);

  // Adjust close link position
  .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: $alert-padding-y $alert-padding-x;
    color: inherit;
  }
}

Uses variables

Code copied to the clipboard.

Copying failed

/* _alert.scss:29 */
$close-font-size
$alert-padding-x
$alert-padding-y
$alert-padding-x

More in Bootstrap Alerts