Search...

Mask

Mask

Bootstrap 5 Masks change an element's visibility by hiding it completely or partially. Contrast Design Masks are used to increase the visibility of material in a photo.

Mask Patterns

The material that we are attempting to hide or partially hide, usually an image, remains in the div with the class view. This content is positioned above the mask div. The overlay or pattern over the content is the div with the class mask. Patterns are used in the code below, and there are plenty to pick from, ranging from pattern-1 to pattern-4.

HTML
html
<div class="view">
<img src="../img/food.jpg" />
<div class="mask pattern-1"></div>
</div>
<div class="view">
<img src="../img/food.jpg" />
<div class="mask pattern-2"></div>
</div>
<div class="view">
<img src="../img/food.jpg" />
<div class="mask pattern-3"></div>
</div>
<div class="view">
<img src="../img/food.jpg" />
<div class="mask pattern-4"></div>
</div>

Mask Light Overlay

To use a light mask overlay instead of a mask, give your mask div the class rgba, then the color you want your overlay to be, and finally the word light (to select the thickness of our overlay

HTML
html
<div class="view">
<img src="../img/food.jpg" />
<div class="mask rgba-blue3-light"></div>
</div>

Mask Strong Overlay

If you'd prefer a more robust Overlay background, append strong to the class instead.

html
html
<div class="view">
<img src="../img/food.jpg" />
<div class="mask rgba-blue-strong"></div>
</div>

Build modern projects using Bootstrap 5 and Contrast

Trying to create components and pages for a web app or website from scratch while maintaining a modern User interface can be very tedious. This is why we created Contrast, to help drastically reduce the amount of time we spend doing that. so we can focus on building some other aspects of the project.

Contrast Bootstrap PRO consists of a Premium UI Kit Library featuring over 10000+ component variants. Which even comes bundled together with its own admin template comprising of 5 admin dashboards and 23+ additional admin and multipurpose pages for building almost any type of website or web app.
See a demo and learn more about Contrast Bootstrap Pro by clicking here.