i have created carousel 3 slides, using bootstrap 3.
in carousel-inner
item
located have added image tags. work well, because images slides , rresize screen size.
inside item
there carousel-caption
have added h1
tag image
tag inside of it. image not resizing keeps big.
i missing something??
my code:
<!-- carousel --> <div id="carousel-main" class="carousel slide" data-ride="carousel"> <!-- indicators --> <ol class="carousel-indicators"> <li data-target="#carousel-main" data-slide-to="0" class="active"></li> <li data-target="#carousel-main" data-slide-to="1"></li> <li data-target="#carousel-main" data-slide-to="2"></li> </ol> <!-- wrapper slides --> <div class="carousel-inner" role="listbox"> <div class="item active"> <img src="images/1.jpg" alt="img1"> <div class="carousel-caption"> <h1> <img src="images/logo_medium.png"> </h1> <h2>hello</h2> <p> <a href="#" class="btn btn-lg btn-primary" data-toggle="modal" data-target="#mymodal">Сделать заказ</a> </p> </div> </div> <div class="item"> <img src="images/2.jpg" alt="img2"> <div class="carousel-caption"> ... </div> </div> <div class="item"> <img src="images/3.jpg" alt="img3"> <div class="carousel-caption"> ... </div> </div> </div> <!-- controls --> <a class="left carousel-control" href="#carousel-main" 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-main" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">next</span> </a> </div> <!-- /. carousel -->
you should give class images below :
<img **class="img-responsive"** src="img/show1.png" alt="" />
css: img-responsive { max-width: 100%;}
Comments
Post a Comment