質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
CSS3

CSS(Cascading Style Sheet)の第3版です。CSS3と略されることが多いです。色やデザインを柔軟に変更することが可能になります。

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

Q&A

解決済

1回答

234閲覧

文字の表示位置を右側から左側に移動させたい

退会済みユーザー

退会済みユーザー

総合スコア0

CSS3

CSS(Cascading Style Sheet)の第3版です。CSS3と略されることが多いです。色やデザインを柔軟に変更することが可能になります。

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

0グッド

1クリップ

投稿2019/07/17 11:47

1.作成したのは以下のものですが、スライドショーが現在<li></li>で囲ったImage 01から06まであり、それぞれにタイトルと小見出しをつけたいと考えています(1枚目だけrogo表示)。
レスポンシブ使用にしたいため、画面を小さくした時には全てのページの文字は現在のとおり中央に配置したいと考えていますが、PC使用の際には現在のように右側に表示したい時とそうではない場合があり、2、4、5ページは左側に移動させたいと考えていますが、どうしても右寄りになってしまい左側への設定ができません。divの中であれば設定ができると思うのですが、aやpは移動ができてもh1やh2が移動できません。

2.6枚目だけ、ほかのページと見え方が違います。ボタンのマウスオーバーが6ページだけ利いている、aにラインが引かれてしまいマウスオーバーすると文字がチラチラします。htmlの記述は同じなのに何故仕様が違ってしまうのかが良くわかりません。

上記2点の問題を解決したいのですが、ご助力頂けませんでしょうか。

html

1<header class="top"> 2 <ul class="slideshow"> 3 <li> 4 <span>Image 01</span> 5 <div class="rogo"> 6 <img src="img/rogo.svg"> 7 </div> 8 </li> 9 <li> 10 <span>Image 02</span> 11 <div class="container-fluid"> 12 <div class="row"> 13 <div class="col-md-6 col-md-offset-3 slider-text"> 14 <div class="slider-text-inner"> 15 <h2 class="key_title">AAAAAAAAA</h2> 16 <a class="">bbbbbbbbbbbbbb</a> 17 <p><a href="#" class="btn btn-primary btn-outline">read more</a></p> 18 </div> 19 </div> 20 </div> 21 </div> 22 </li> 23          </ul> 24</header>

css

1.top { 2 width: 100%; 3 min-height: 700px; 4 height: 100%; 5 min-height: 500px; 6 position: relative; 7 text-align: center; 8 background-size: cover; 9 padding: 100px 0; 10} 11.rogo img { 12 width: 300px; 13 height: 300px; 14 position: absolute; 15 top: 50%; 16 left: 50%; 17 margin: -100px 0 0 -100px; 18 z-index: 999; 19} 20ul li { 21 list-style: none; 22} 23.slideshow li span { 24 width: 100vw; 25 height: 100vh; 26 position: absolute; 27 top: 0px; 28 left: 0px; 29 color: transparent; 30 background-size: cover; 31 background-position: 50% 50%; 32 background-repeat: no-repeat; 33 opacity: 0; 34 z-index: 0; 35 animation: imageAnimation 36s linear infinite 0s; 36} 37.slider-text { 38 display: table; 39 min-height: 500px; 40} 41.slideshow li div { 42 z-index: 1000; 43 position: absolute; 44 left: 0%; 45 top: 35%; 46 width: 100%; 47 opacity: 0; 48 color: #fff; 49 animation: titleAnimation 36s linear infinite 0s; 50} 51.slider-text .textleft { 52 text-align: left; 53} 54.intro .slider-text-inner h1 { 55 z-index: 50; 56 font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif; 57 font-size: 50px; 58 color: #fff; 59 font-weight: bold; 60 line-height: 1.2; 61 text-align: center; 62} 63.intro .slider-text-inner h2 { 64 z-index: 50; 65 font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif; 66 font-size: 50px; 67 color: #fff; 68 font-weight: bold; 69 line-height: 1.2; 70 text-align: center; 71} 72.slideshow li:nth-child(1) span{ 73 background-image : url(../img/01.jpg); 74} 75.slideshow li:nth-child(2) span{ 76 background-image : url(../img/02.jpg); 77 -webkit-animation-delay: 6s; 78 -moz-animation-delay: 6s; 79 -o-animation-delay: 6s; 80 -ms-animation-delay: 6s; 81 animation-delay: 6s; 82} 83.slideshow li:nth-child(3) span{ 84 background-image : url(../img/03.jpg); 85 -webkit-animation-delay: 12s; 86 -moz-animation-delay: 12s; 87 -o-animation-delay: 12s; 88 -ms-animation-delay: 12s; 89 animation-delay: 12s; 90} 91.slideshow li:nth-child(4) span{ 92 background-image: url(../img/04.jpg); 93 -webkit-animation-delay: 18s; 94 -moz-animation-delay: 18s; 95 -o-animation-delay: 18s; 96 -ms-animation-delay: 18s; 97 animation-delay: 18s; 98} 99.slideshow li:nth-child(5) span{ 100 background-image: url(../img/05.jpg); 101 -webkit-animation-delay: 24s; 102 -moz-animation-delay: 24s; 103 -o-animation-delay: 24s; 104 -ms-animation-delay: 24s; 105 animation-delay: 24s; 106} 107.slideshow li:nth-child(6) span{ 108 background-image: url(../img/06.jpg); 109 -webkit-animation-delay: 30s; 110 -moz-animation-delay: 30s; 111 -o-animation-delay: 30s; 112 -ms-animation-delay: 30s; 113 animation-delay: 30s; 114} 115.slideshow li:nth-child(2) div { 116 -webkit-animation-delay: 6s; 117 -moz-animation-delay: 6s; 118 -o-animation-delay: 6s; 119 -ms-animation-delay: 6s; 120 animation-delay: 6s; 121} 122.slideshow li:nth-child(3) div { 123 -webkit-animation-delay: 12s; 124 -moz-animation-delay: 12s; 125 -o-animation-delay: 12s; 126 -ms-animation-delay: 12s; 127 animation-delay: 12s; 128} 129.slideshow li:nth-child(4) div { 130 -webkit-animation-delay: 18s; 131 -moz-animation-delay: 18s; 132 -o-animation-delay: 18s; 133 -ms-animation-delay: 18s; 134 animation-delay: 18s; 135} 136.slideshow li:nth-child(5) div { 137 -webkit-animation-delay: 24s; 138 -moz-animation-delay: 24s; 139 -o-animation-delay: 24s; 140 -ms-animation-delay: 24s; 141 animation-delay: 24s; 142} 143.slideshow li:nth-child(6) div { 144 -webkit-animation-delay: 30s; 145 -moz-animation-delay: 30s; 146 -o-animation-delay: 30s; 147 -ms-animation-delay: 30s; 148 animation-delay: 30s; 149} 150@keyframes imageAnimation { 151 0% { 152 opacity: 0; 153 animation-timing-function: ease-in; 154 } 155 4% { 156 opacity: 1; 157 animation-timing-function: ease-out; 158 } 159 17% { 160 opacity: 1 161 } 162 25% { 163 opacity: 0 164 } 165 100% { 166 opacity: 0 167 } 168} 169@keyframes titleAnimation { 170 0% { 171 opacity: 0 172 } 173 4% { 174 opacity: 1 175 } 176 17% { 177 opacity: 1 178 } 179 19% { 180 opacity: 0 181 } 182 100% { 183 opacity: 0 184 } 185}

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

自己解決しました。ありがとうございました。

投稿2019/08/04 06:44

退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問