Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap carousel text dim in Safari

I'm using Bootstrap 3.3.1 and I notice that text dims when the carousel scrolls in Safari. Chrome is fine.

Here's a demo, using sample code from the official site: http://s.codepen.io/resting/debug/QwEoPp?
Pen: http://codepen.io/resting/pen/QwEoPp

Code:

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="http://placehold.it/1024x400" alt="...">

      <div class="carousel-caption">
        ...
      </div>
    </div>
    <div class="item">
      <img src="http://placehold.it/1024x400" alt="...">

      <div class="carousel-caption">
        ...
      </div>
    </div>
    ...
  </div>

  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

<div class="container-fluid">

  <div class="row">
    <div class="col-xs-12">
      Text dim in Safari when carousel scrolls.
    </div>
  </div>
</div>

Anyone has any fix for this?

like image 715
resting Avatar asked Mar 18 '23 13:03

resting


1 Answers

Fixed with

.carousel-inner {
  -webkit-transform-style: preserve-3d;
}
like image 175
resting Avatar answered Mar 28 '23 21:03

resting