Gradient

Bootstrap gradient

Note: We are transitioning MDB4 to a legacy version and focusing on developing MDB5. While we'll continue to support for the transition period, we encourage you to migrate to MDB5. We're offering a huge discount on MDB5 PRO to help with your transition, enabling you to leverage the full potential of the latest version. You can find more information here.
upgrade with discount

The Bootstrap gradient effect is a linear color progression - a smooth transition between two colors.The gradient effect can be used in a variety of components.

Gradients are now coming back to website design, so it's a good idea to try them out in your projects.


Basic gradients

The four bright gradients, that are most commonly used in MDB.

purple-gradient
blue-gradient
aqua-gradient
peach-gradient
        
            

        <!-- Grid row -->
        <div class="row">

            <!-- Grid column -->
            <div class="col-md-3 mb-4">
              <div class="purple-gradient color-block mb-3 mx-auto rounded-circle z-depth-1"></div>
              <h5 class="mb-0">purple-gradient</h5>
            </div>
            <!-- Grid column -->

            <!-- Grid column -->
            <div class="col-md-3 mb-4">
              <div class="blue-gradient color-block mb-3 mx-auto rounded-circle z-depth-1"></div>
              <h5 class="mb-0">blue-gradient</h5>
            </div>
            <!-- Grid column -->

            <!-- Grid column -->
            <div class="col-md-3 mb-4">
              <div class="aqua-gradient color-block mb-3 mx-auto rounded-circle z-depth-1"></div>
              <h5 class="mb-0">aqua-gradient</h5>
            </div>
            <!-- Grid column -->

            <!-- Grid column -->
            <div class="col-md-3 mb-4">
              <div class="peach-gradient color-block mb-3 mx-auto rounded-circle z-depth-1"></div>
              <h5 class="mb-0">peach-gradient</h5>
            </div>
            <!-- Grid column -->

        </div>
        <!-- Grid row -->

      
        
    

Additional gradients

Below, you have lighter, gentle, eye-catching gradients options.

warm-flame-gradient
night-fade-gradient
spring-warmth-gradient
juicy-peach-gradient
young-passion-gradient
rainy-ashville-gradient
sunny-morning-gradient
lady-lips-gradient
winter-neva-gradient
frozen-dreams-gradient
dusty-grass-gradient
tempting-azure-gradient
heavy-rain-gradient
amy-crisp-gradient
mean-fruit-gradient
deep-blue-gradient
ripe-malinka-gradient
cloudy-knoxville-gradient
morpheus-den-gradient
rare-wind-gradient
near-moon-gradient
        
            

        <!-- Grid row -->
        <div class="row">

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="warm-flame-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>warm-flame-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="night-fade-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>night-fade-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="spring-warmth-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>spring-warmth-gradient</h5>
          </div>
          <!-- Grid column -->

        </div>
        <!-- Grid row -->

        <!-- Grid row -->
        <div class="row">

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="juicy-peach-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>juicy-peach-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="young-passion-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>young-passion-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4">
            <div class="rainy-ashville-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>rainy-ashville-gradient</h5>
          </div>
          <!-- Grid column -->

        </div>
        <!-- Grid row -->

        <!-- Grid row -->
        <div class="row">

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="sunny-morning-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>sunny-morning-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="lady-lips-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>lady-lips-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="winter-neva-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>winter-neva-gradient</h5>
          </div>
          <!-- Grid column -->

        </div>
        <!-- Grid row -->

        <!-- Grid row -->
        <div class="row">

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="frozen-dreams-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>frozen-dreams-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="dusty-grass-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>dusty-grass-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="tempting-azure-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>tempting-azure-gradient</h5>
          </div>
          <!-- Grid column -->

        </div>
        <!-- Grid row -->

        <!-- Grid row -->
        <div class="row">

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="heavy-rain-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>heavy-rain-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="amy-crisp-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>amy-crisp-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="mean-fruit-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>mean-fruit-gradient</h5>
          </div>
          <!-- Grid column -->

        </div>
        <!-- Grid row -->

        <!-- Grid row -->
        <div class="row">

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="deep-blue-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>deep-blue-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="ripe-malinka-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>ripe-malinka-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4">
            <div class="cloudy-knoxville-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>cloudy-knoxville-gradient</h5>
          </div>
          <!-- Grid column -->

        </div>
        <!-- Grid row -->

        <!-- Grid row -->
        <div class="row">

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="morpheus-den-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>morpheus-den-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="rare-wind-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>rare-wind-gradient</h5>
          </div>
          <!-- Grid column -->

          <!-- Grid column -->
          <div class="col-md-4 mb-4">
            <div class="near-moon-gradient color-block mb-3 mx-auto rounded-circle z-depth-1-half"></div>
            <h5>near-moon-gradient</h5>
          </div>
          <!-- Grid column -->

        </div>
        <!-- Grid row -->

      
        
    

Gradient on an image

Before

My photo

After

My photo
        
            

        <div class="img-gradient">
          <img src="https://mdbootstrap.com/img/Photos/Horizontal/Nature/6-col/img (122).webp" class="img-fluid" alt="My photo">
        </div>

      
        
    
        
            
        .img-gradient{
          position:relative;
          display:inline-block;
        }
        .img-gradient:after {
          content:'';
          position:absolute;
          left:0; top:0;
          width:100%; height:100%;
          display:inline-block;
          background: -moz-linear-gradient(top, rgba(0,47,75,0.5) 0%, rgba(220, 66, 37, 0.5) 100%); /* FF3.6+ */
          background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(220, 66, 37, 0.5)), color-stop(100%,rgba(0,47,75,0.5))); /* Chrome,Safari4+ */
          background: -webkit-linear-gradient(top, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* Chrome10+,Safari5.1+ */
          background: -o-linear-gradient(top, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* Opera 11.10+ */
          background: -ms-linear-gradient(top, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* IE10+ */
          background: linear-gradient(to bottom, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* W3C */
          filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#002f4b', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */
        }
        .img-gradient img{
          display:block;
        }
      
        
    

Gradient overlay on hover

Image with a slight blue overlay.

.near-moon-gradient

Image with a slight red overlay.

.cloudy-knoxville-gradient

Image with a slight pink overlay.

.rainy-ashville-gradient

        
            

        <div class="row">

          <div class="col-md-4">
              <div class="view overlay">
                  <img src="https://mdbootstrap.com/img/Photos/Others/forest-sm.webp" class="img-fluid" alt="Image with a slight blue overlay.">
                  <div class="mask near-moon-gradient"></div>
              </div>
          </div>
  
          <div class="col-md-4">
              <div class="view overlay">
                  <img src="https://mdbootstrap.com/img/Photos/Others/forest-sm.webp" class="img-fluid" alt="Image with a slight red overlay.">
                  <div class="mask cloudy-knoxville-gradient"></div>
              </div>
          </div>
  
          <div class="col-md-4">
              <div class="view overlay">
                  <img src="https://mdbootstrap.com/img/Photos/Others/forest-sm.webp" class="img-fluid" alt="Image with a slight pink overlay.">
                  <div class="mask rainy-ashville-gradient"></div>
              </div>
          </div>

      </div>

      
        
    
        
            
        
        .overlay .mask:hover {
          opacity: 0.5;
        }
      
        
    

Gradient within cards MDB Pro component

Culinary

Cheat day inspirations

Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi.

Button
        
            

            <div class="card card-cascade narrower">

              <!--Card image-->
              <div class="view view-cascade">
                  <img src="https://mdbootstrap.com/img/Photos/Lightbox/Thumbnail/img%20(147).webp" class="card-img-top" alt="photo">
                  <a>
                      <div class="mask img-gradient"></div>
                  </a>
              </div>
              <!--/.Card image-->

              <!--Card content-->
              <div class="card-body card-body-cascade">
                  <h5 class="pink-text"><i class="fas fa-utensils"></i> Culinary</h5>
                  <!--Title-->
                  <h4 class="card-title">Cheat day inspirations</h4>
                  <!--Text-->
                  <p class="card-text">Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut
                      aliquid ex ea commodi.</p>
                  <a class="btn btn-unique waves-effect waves-light">Button</a>
              </div>
              <!--/.Card content-->

            </div>

          
        
    
        
            
            .img-gradient {
              position:relative;
              display:inline-block;
            }
            .img-gradient:after {
              content:'';
              position:absolute;
              left:0; top:0;
              width:100%; height:100%;
              display:inline-block;
              background: -moz-linear-gradient(top, rgba(0,47,75,0.5) 0%, rgba(220, 66, 37, 0.5) 100%); /* FF3.6+ */
              background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(220, 66, 37, 0.5)), color-stop(100%,rgba(0,47,75,0.5))); /* Chrome,Safari4+ */
              background: -webkit-linear-gradient(top, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* Chrome10+,Safari5.1+ */
              background: -o-linear-gradient(top, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* Opera 11.10+ */
              background: -ms-linear-gradient(top, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* IE10+ */
              background: linear-gradient(to bottom, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* W3C */
              filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#002f4b', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */
            }
            .img-gradient img{
              display:block;
            }

            .img-gradient-overlay { /* FF3.6+ */ /* Chrome,Safari4+ */
              background: -webkit-linear-gradient(rgba(0,47,75,0.5) 0%, rgba(220, 66, 37, 0.5) 100%);
              background: -o-linear-gradient(rgba(0,47,75,0.5) 0%, rgba(220, 66, 37, 0.5) 100%);
              background: linear-gradient(rgba(0,47,75,0.5) 0%, rgba(220, 66, 37, 0.5) 100%); /* Chrome10+,Safari5.1+ */ /* Opera 11.10+ */ /* IE10+ */ /* W3C */
              filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#002f4b', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */
              border-radius: .3rem;
            }
          
        
    
Software

This is a card title

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellat fugiat, laboriosam, voluptatem, optio vero odio nam sit officia accusamus minus error nisi architecto nulla ipsum dignissimos. Odit sed qui, dolorum!.

View project
        
            

            <div class="card card-image mb-3" style="background-image: url('https://mdbootstrap.com/img/Photos/Horizontal/City/6-col/img%20(47).webp');">
                <div class="text-white text-center d-flex align-items-center img-gradient-overlay py-5 px-4">
                    <div>
                        <h5 class="orange-text"><i class="fas fa-desktop"></i> Software</h5>
                        <h3 class="card-title pt-2"><strong>This is card title</strong></h3>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellat fugiat, laboriosam, voluptatem,
                            optio vero odio nam sit officia accusamus minus error nisi architecto nulla ipsum dignissimos.
                            Odit sed qui, dolorum!.</p>
                        <a class="btn btn-deep-orange waves-effect waves-light"><i class="far fa-clone left"></i> View project</a>
                    </div>
                </div>
            </div>

          
        
    
        
            
            .img-gradient {
              position:relative;
              display:inline-block;
            }
            .img-gradient:after {
              content:'';
              position:absolute;
              left:0; top:0;
              width:100%; height:100%;
              display:inline-block;
              background: -moz-linear-gradient(top, rgba(0,47,75,0.5) 0%, rgba(220, 66, 37, 0.5) 100%); /* FF3.6+ */
              background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(220, 66, 37, 0.5)), color-stop(100%,rgba(0,47,75,0.5))); /* Chrome,Safari4+ */
              background: -webkit-linear-gradient(top, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* Chrome10+,Safari5.1+ */
              background: -o-linear-gradient(top, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* Opera 11.10+ */
              background: -ms-linear-gradient(top, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* IE10+ */
              background: linear-gradient(to bottom, rgba(0,47,75,0.5) 0%,rgba(220, 66, 37, 0.5) 100%); /* W3C */
              filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#002f4b', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */
            }
            .img-gradient img{
              display:block;
            }

            .img-gradient-overlay { /* FF3.6+ */ /* Chrome,Safari4+ */
              background: -webkit-linear-gradient(rgba(0,47,75,0.5) 0%, rgba(220, 66, 37, 0.5) 100%);
              background: -o-linear-gradient(rgba(0,47,75,0.5) 0%, rgba(220, 66, 37, 0.5) 100%);
              background: linear-gradient(rgba(0,47,75,0.5) 0%, rgba(220, 66, 37, 0.5) 100%); /* Chrome10+,Safari5.1+ */ /* Opera 11.10+ */ /* IE10+ */ /* W3C */
              filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#002f4b', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */
              border-radius: .3rem;
            }
          
        
    

Testimonial cards with gradients MDB Pro component

Testimonials

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit, error amet numquam iure provident voluptate esse quasi, veritatis totam voluptas nostrum quisquam eum porro a pariatur accusamus veniam.

Example photo

John Doe


Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci.

Example photo

Anna Aston


Neque cupiditate assumenda in maiores repudiandae mollitia architecto.

Example photo

Maria Kate


Delectus impedit saepe officiis ab aliquam repellat, rem totam unde ducimus.

        
            

        <!--Section: Testimonials-->
        <section class="text-center">

            <!--Section heading-->
            <h2 class="h1 pt-4">Testimonials</h2>
            <!--Section description-->
            <p class="grey-text mb-5 mt-5 px-3">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit, error amet numquam iure provident voluptate esse quasi, veritatis totam voluptas nostrum quisquam eum porro a pariatur accusamus veniam.</p>

            <div class="row">

                <!--Grid column-->
                <div class="col-lg-4 col-md-12 mb-4">

                    <!--Card-->
                    <div class="card testimonial-card">

                        <!--Background color-->
                        <div class="card-up sunny-morning-gradient">
                        </div>

                        <!--Avatar-->
                        <div class="avatar mx-auto"><img src="https://mdbootstrap.com/img/Photos/Avatars/img%20(27).webp" class="rounded-circle img-responsive" alt="Example photo">
                        </div>

                        <div class="card-body">
                            <!--Name-->
                            <h4 class="card-title mt-1">John Doe</h4>
                            <hr>
                            <!--Quotation-->
                            <p><i class="fas fa-quote-left"></i> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci.</p>
                        </div>

                    </div>
                    <!--Card-->

                </div>
                <!--Grid column-->

                <!--Grid column-->
                <div class="col-lg-4 col-md-12 mb-4">

                    <!--Card-->
                    <div class="card testimonial-card">

                        <!--Background color-->
                        <div class="card-up rainy-ashville-gradient">
                        </div>

                        <!--Avatar-->
                        <div class="avatar mx-auto"><img src="https://mdbootstrap.com/img/Photos/Avatars/img%20(20).webp" class="rounded-circle img-responsive" alt="Example photo">
                        </div>

                        <div class="card-body">
                            <!--Name-->
                            <h4 class="card-title mt-1">Anna Aston</h4>
                            <hr>
                            <!--Quotation-->
                            <p><i class="fas fa-quote-left"></i> Neque cupiditate assumenda in maiores repudiandae mollitia architecto.</p>
                        </div>

                    </div>
                    <!--Card-->

                </div>
                <!--Grid column-->

                <!--Grid column-->
                <div class="col-lg-4 col-md-12 mb-4">

                    <!--Card-->
                    <div class="card testimonial-card">

                        <!--Background color-->
                        <div class="card-up lady-lips-gradient"></div>

                        <!--Avatar-->
                        <div class="avatar mx-auto"><img src="https://mdbootstrap.com/img/Photos/Avatars/img%20(10).webp" class="rounded-circle img-responsive" alt="Example photo">
                        </div>

                        <div class="card-body">
                            <!--Name-->
                            <h4 class="card-title mt-1">Maria Kate</h4>
                            <hr>
                            <!--Quotation-->
                            <p><i class="fas fa-quote-left"></i> Delectus impedit saepe officiis ab aliquam repellat, rem totam unde ducimus.</p>
                        </div>

                    </div>
                    <!--Card-->

                </div>
                <!--Grid column-->

            </div>

        </section>
        <!--Section: Testimonials-->

      
        
    

Gradient buttons MDB Pro component

        
            

        <!-- Grid row -->
        <div class="row">

            <!-- Grid column -->
            <div class="col-md-12 mb-4">

                <a class="btn-floating btn-lg purple-gradient"><i class="fas fa-bolt"></i></a>
                <a class="btn-floating peach-gradient"><i class="fas fa-leaf"></i></a>
                <a class="btn-floating btn-sm blue-gradient"><i class="fas fa-star"></i></a>

            </div>
            <!-- Grid column -->

            <!-- Grid column -->
            <div class="col-md-12 mb-4">

                <button type="button" class="btn peach-gradient btn-rounded">Primary</button>
                <button type="button" class="btn blue-gradient btn-rounded">Default</button>
                <button type="button" class="btn purple-gradient btn-rounded">Secondary</button>

            </div>
            <!-- Grid column -->

            <!-- Grid column -->
            <div class="col-md-12">

                <button type="button" class="btn blue-gradient">Primary</button>
                <button type="button" class="btn purple-gradient">Default</button>
                <button type="button" class="btn peach-gradient">Secondary</button>

            </div>
            <!-- Grid column -->

        </div>
        <!-- Grid row -->