Bootstrap carousel resizing image

前端 未结 10 1082
[愿得一人]
[愿得一人] 2020-12-05 11:02

Hi I am trying to make a carousel on my wordpress website with bootstrap. I would like to put four block links next to it. I have the blocks there and the images are scrolli

相关标签:
10条回答
  • 2020-12-05 11:32

    Put the following code in your CSS, this works with Bootstrap 4:

    .w-100 {
      width: 100% !important;
      height: 75vh;
    }
    
    0 讨论(0)
  • 2020-12-05 11:37

    Put the following code into head section in your web page programming.

    <head>
      <style>.carousel-inner > .item > img { width:100%; height:570px; } </style>
    </head>
    
    0 讨论(0)
  • 2020-12-05 11:40

    add this to your css:

    .carousel-inner > .item > img, .carousel-inner > .item > a > img {
        width: 100%;
    }
    
    0 讨论(0)
  • 2020-12-05 11:41

    i had this issue years back..but I got this. All you need to do is set the width and the height of the image to whatever you want..what i mean is your image in your carousel inner ...don't add the style attribut like "style:"(no not this) but something like this and make sure your codes ar correct its gonna work...Good luck

    0 讨论(0)
提交回复
热议问题