左右に余白をつけて、見えている数字をかぶらせないようにする(1~3を表示させてループ、4は始めは見えない)方法が分かりません。
<!DOCTYPE html> <html lang="ja"> <head> <title></title> <link rel="shortcut icon" href="images/favicon.ico"> <meta charset="utf-8"> <meta name="robots" content="noindex,nofollow"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.0/animate.min.css"> <link rel="stylesheet" href="css/basic_style.css"> <!--14,15新しく--> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.3.3/css/swiper.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.3.3/js/swiper.min.js"> <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/lazyload@2.0.0-rc.2/lazyload.min.js"></script> <script src="./js/wow.min.js"></script> <script type="text/javascript"> var ua = navigator.userAgent; if (ua.indexOf('iPhone') > 0 || (ua.indexOf('Android') > 0) && (ua.indexOf('Mobile') > 0) || ua.indexOf('Windows Phone') > 0) { location.href = './sp/'; } </script> </head> <body> <div class="wrapper"> <div style="display:grid;grid-template-columns:calc(100% - 30px) 30px;"> <!-- Swiper START --> <div class="swiper-container"> <!-- メイン表示部分 --> <div class="swiper-wrapper"> <!-- 各スライド --> <div class="swiper-slide">Slide 1</div> <div class="swiper-slide">Slide 2</div> <div class="swiper-slide">Slide 3</div> <div class="swiper-slide">Slide 4</div> </div> <div class="swiper-button-prev"></div> <div class="swiper-button-next"></div> <div class="swiper-pagination"></div> </div></div> <!-- Swiper END --> <script> var mySwiper = new Swiper('.swiper-container', { slidesPerView: 3, loop: true, autoplay: { delay: 3000, stopOnLastSlide: false, disableOnInteraction: false, reverseDirection: false }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev' }, pagination: { el: '.swiper-pagination', type: 'bullets', clickable: true } }); </script> </body> </HTML>
@charset "utf-8"; /* Theme Name: SUBHAND Author: SUBHAND.LLC Author URL: http://www.subhand.net/ */ /* common ---------------------------------------------*/ * {margin:0;padding:0;} a:link,a:visited { color: #ffffff; text-decoration:underline; } a:hover,a:active { color: #d90909; text-decoration:underline; } .impact {font-size:20pt; font-weight:bold;} .impact2 {color:red;} .impact3 {background:yellow; color:#000;} /* #impact4 {underline:;} */ .impact5 {background:#173B50; padding:2px 5px; color:#fff;} .impact6 {background:#f4f4f4; padding:3px; line-height:1.1;} .impact7 {background: #B60000; padding:2px 5px; color:#fff;} .style2 {color: #FF0000} .style3 {color: #333333} .style4 {color: #000000} img{ border: none;} /* ボタンのマウスオーバーで明るくする */ .btn:hover { filter: brightness(120%); } ol, ul { list-style-type: none; } /* animation ---------------------------------------------*/ .feedInUp { opacity: 0; transform: translate(0,30px); -webkit-transform: translate(0,30px); transition: 1.5s; } .feedInUp_On { opacity: 1.0; transform: translate(0,0); -webkit-transform: translate(0,0); } /* layout ---------------------------------------------*/ /*TopIntro-Start*/ body { width: 100%; height: 100%; margin: 0px; padding: 0px; background-color: #fff; background-repeat: repeat; background-attachment: fixed; background-position: top center; -webkit-text-size-adjust:none; text-align:center; font-size:18px; font-family: 'meiryo', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'MS Pゴシック', sans-serif; color: #383d5c; } .wrapper{ overflow:hidden; } /* 全体のスタイル */] .swiper-wrapper { width: 100%; height: 250px; } /* 全スライド共通スタイル */ .swiper-slide { color: #ffffff; width: 100%; height: 100%; text-align: center; line-height: 250px; } /* 4の倍数+1枚目のスライドのスタイル(1枚目、5枚目…) */ .swiper-slide:nth-child(4n+1) { background-color: #EECB27; } /* 4の倍数+2枚目のスライドのスタイル(2枚目、6枚目…) */ .swiper-slide:nth-child(4n+2) { background-color: #E13239; } /* 4の倍数+3枚目のスライドのスタイル(3枚目、7枚目…) */ .swiper-slide:nth-child(4n+3) { background-color: #1F1762; } /* 4の倍数+4枚目のスライドのスタイル(4枚目、8枚目…) */ .swiper-slide:nth-child(4n+4) { background-color: #BEDAE5; } # #container { text-align:left; width:1000px; margin:0 auto; } #container2 { text-align:left; width:800px; margin:0 auto; } #containerform { text-align:left; width: 450px; margin-left: 50px; }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/12/27 12:40