0

私のサイトには、誰かがサイトを閲覧するときに、スクロールすることでコンテンツを表示できるという単純なものが必要です。

幅が100%のスライダーがあるとすると、スライダーの下部にあるスクロールバーで画像の他の部分を見ることができます。左右のコンテンツも同じです。

誰かがこれを適用するためのトリックを知っていますか?私が幅を書くとき:100%; オーバーフロー:スクロールすると、小さな画面から試したときにユーザーに何も表示されません。

 <div class="slide-images">
                        <div class="slide-img">
                            <img src="assets/img/slide_plumb_01.png" alt="">
                        </div>
                        <div class="slide-img">
                            <img src="assets/img/slide_plumb_02.png" alt="">
                        </div>
                        <div class="slide-img">
                            <img src="assets/img/slide_plumb_03.png" alt="">
                        </div>
                    </div>
4

1 に答える 1

2

When you use width: 100%; it means it's 100% to the viewport so I wonder how this fails for you, instead of % use em, also scrolling is available by default if your page exceeds the height and width of the viewport, unless and until you use overflow: hidden; and if you want different styles for screens and devices use CSS3 @media queries

Syntax

@media all and (max-width: 400px) and (min-width: 240px) { /* You can set the
                                                              resolutions here
                                                           */
  /* Styles goes here */
}

Here's a nice article to get started with media queries

于 2013-03-02T19:58:20.077 に答える