how to leave the slider Responsive? [duplicate]

-1

I have a slider in pure css and would like to make it responsive.

<title>Slider UNIP</title>
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="./css/vendor/normalize.css">
  <link rel="stylesheet" href="../../dist/gallery.prefixed.css">
  <link rel="stylesheet" href="../../dist/gallery.theme.css">
</head>
<body>

  <div class="gallery items-3">
  <div id="item-1" class="control-operator"></div>
  <div id="item-2" class="control-operator"></div>
  <div id="item-3" class="control-operator"></div>

  <figure class="item">
    <img src="C:\Users\jose\Desktop\css\gallery-css-master\examples\standard\agua1.jpg"/>
  </figure>

  <figure class="item">
    <img src="C:\Users\jose\Desktop\css\gallery-css-master\examples\standard\agua3.jpg"/>
  </figure>

  <figure class="item">
    <img src="C:\Users\jose\Desktop\css\gallery-css-master\examples\standard\agua2.png"/>
  </figure>

  <div class="controls">
    <a href="#item-1" class="control-button">•</a>
    <a href="#item-2" class="control-button">•</a>
    <a href="#item-3" class="control-button">•</a>

  </div>
</div>
</body>
</html>
    
asked by anonymous 07.05.2016 / 22:12

1 answer

0

Creates a div between the slider images occupying the entire screen with width: 100% , and then only for each slider to occupy 33% of the parent width. In mobile, it is recommended that the image occupy the entire screen. Hence goes the other viewport issue, @mediaqueries.

<div class="sliders">
    <figure class="slide-item"><img src="" alt=""></figure>
    <figure class="slide-item"><img src="" alt=""></figure>
    <figure class="slide-item"><img src="" alt=""></figure>
    </div>

.sliders { width: 100% }
.sliders figure { width: 32%; margin-right: 1%; float: left }
.sliders figure img { width: 100% }

There you go according to how many sliders you want in the container.

    
08.05.2016 / 03:40