コード ```### 前提・実現したいこと Swiperで ①「pagination」の変更をしたい。オプション範囲内でお願いします。 ②3枚のスライド画像を使用していますが、画像下部に「>」が表示されています。非表示または見えないようにしたいです。 ### 発生している問題・エラーメッセージ 画像3枚のスライドで動作はしております。 HTML <!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>swiperJS</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.1/css/swiper.css"> <link rel="stylesheet" href="該当のcss"> </head> <style type="text/css"> <!-- a:hover { opacity:0.8; filter:alpha(opacity=60); -ms-filter: "alpha( opacity=60 )"; } --> </style> <!-- スライドバナー編集はこちらのhtmlからサイズ幅750縦450で作成 --> <body> <div class="mainslide container"> <div class="container"> <div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide"><a href="●●●" target="_top"><img src="http://www.oda-pottery.co.jp/cgi-bin/oda-pottery/siteup.cgi?category=3&page=4"></a>></div> <div class="swiper-slide"><a href="●●●" target="_top"><img src="http://www.oda-pottery.co.jp/cgi-bin/oda-pottery/siteup.cgi?category=3&page=4"></a>></div> <div class="swiper-slide"><a href="●●●" target="_top"><img src="http://www.oda-pottery.co.jp/cgi-bin/oda-pottery/siteup.cgi?category=3&page=4"></a>></div> </div> <!-- スライドバナー編集はこちらのhtmlからサイズ幅750縦450で作成ここまで -->+ <div class="swiper-pagination"></div> <!-- If we need navigation buttons --> <div class="swiper-button-prev"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 44"> <path class="arrow arrow-left" d="M0,22L22,0l2.1,2.1L4.2,22l19.9,19.9L22,44L0,22L0,22L0,22z" /> </svg> </div><!-- .swiper-button-prev --> <div class="swiper-button-next"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 44"> <path class="arrow arrow-right" d="M27,22L27,22L5,44l-2.1-2.1L22.8,22L2.9,2.1L5,0L27,22L27,22z" /> </svg> </div><!-- .swiper-button-next --> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.1/js/swiper.min.js"></script> <script> var swiper = new Swiper('.swiper-container', { slidesPerView: 3, autoplay: 3000, speed: 2000, loop: true, centeredSlides: true, paginationClickable: true, pagination: '.swiper-pagination', autoplayDisableOnInteraction: false, // ナビゲーションボタン nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', // 1スライドごとの余白 spaceBetween: 5 }); </script> </body> </html> css .container { max-width: 1050px; overflow: hidden; } .swiper-container { width: 200%; margin: 0 -65%; } .swiper-button-prev { left: calc(10px + 28%); } .swiper-button-next { right: calc(10px + 28%); } .swiper-slide img { width: 100%; } .swiper-slide-next{ opacity: 0.2; } .swiper-slide-prev{ opacity: 0.2; }
? display: none じゃ消えなかったのかい?
書かれている状況が再現するコード(HTML/CSS/JavaScript)か、再現するURLを提示されたほうが回答を得やすいと思います。プラグイン/ライブラリは公式配布サイトのURLを質問文に追記ください。(URLにはリンクを張ることができます)
ご連絡ありがとうございます。HTMLを追記しました。Swiperで「pagination」変更はできましたが、画像下部の「>」が表示されてしまいます。非表示の方法をご教授お願いします。
質問文のコードはコードブロックで囲んでいただけませんか? ```(バッククオート3つ)で囲み、前後に改行をいれるか、コードを選択して「<code>」ボタンを押すとコードブロックになります。また、スクリーンショットなどで説明されてはいかがでしょうか。
回答2件
あなたの回答
tips
プレビュー