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

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

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

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

HTML5

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

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

CSS

CSSはXMLやHTMLで表現した色・レイアウト・フォントなどの要素を指示する仕様の1つです。

Q&A

0回答

535閲覧

HTMLのselectタグで作ったプルダウンメニューが開きません。

js_boy

総合スコア10

CSS3

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

HTML5

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

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

CSS

CSSはXMLやHTMLで表現した色・レイアウト・フォントなどの要素を指示する仕様の1つです。

0グッド

1クリップ

投稿2019/11/14 04:04

編集2019/11/14 05:08

HTMLのselectタグで作ったプルダウンメニューが開きません。
しかし、Chromeを検証モード(ディベロッパーツール)にするとプルダウンメニューをクリックすると展開します。
何が原因なのでしょうか・・・。
宜しくお願い致します。

HTML

1 <form action="#" method="post"> 2 3 <div class="item"> 4 <div class="category"> 5 <label class="label_c">お問い合わせ種別</label> 6 <select type="type" name="select" placeholder="ーーー"> 7 <option>選択してください</option> 8 <option>テキスト1</option> 9 <option>テキスト2</option> 10 <option>テキスト3</option> 11 </select> 12 </div> 13 </div> 14 15 <div class="item"> 16 <label class="label_c">氏名<span class="required">必須</span></label> 17 <input class="inputs" type="text" name="name" placeholder="氏名"> 18 </div> 19 20 <div class="item"> 21 <label class="label_c">フリガナ<span class="required2">必須</span></label> 22 <input class="inputs" type="text" name="name" placeholder="フリガナ"> 23 </div> 24 25 <div class="item"> 26 <label class="label_c">メール</label> 27 <input class="inputs_email" type="email" name="mail" placeholder="sample@gmail.com"> 28 </div> 29 30 <div class="item"> 31 <div class="sex"> 32 <label class="label_c">性別</label> 33 <input type="radio" name="radio" class="radio-input" id="male"> 34 <label for="male">男性</label> 35 <input type="radio" name="radio" class="radio-input" id="female"> 36 <label for="female">女性</label> 37 </div> 38 </div> 39 40 <div class="item"> 41 <label class="label_c">メッセージ</label> 42 <textarea class="comment" name="comment"></textarea> 43 </div> 44 45 <div class="checkbox"> 46 <label> 47 <input type="checkbox" name="checkbox[]" class="checkbox-input"> 48 <span class="checkbox-parts">個人情報保護方針に合意する</span> 49 </label> 50 </div> 51 52 <button type="submit" class="submitbtn"> 53 送信する 54 </button> 55 56 </form>

CSS

1.label_c { 2 text-align: left; 3 font-size: 22px; 4 line-height: 22.5px; 5 font-family: 'Yu Gothic'; 6 font-weight: medium; 7 color: #3E3E3E; 8 margin-top: 0px; 9 margin-right: 0px; 10 margin-bottom: 0px; 11} 12 13select { 14 border: 1px solid #707070; 15 color:#CCCCCC; 16 font-size: 18px; 17 line-height: 22.5px; 18 font-family: 'Yu Gothic'; 19 height: 32px; 20 margin-left: 99px; 21 padding-left: 20px; 22 padding-right: 97px; 23} 24 25select option { 26 color: #333333; 27} 28 29select option:first-child{ 30 display: none; 31} 32 33.required { 34 background-color: #FF4646; 35 width: 55px; 36 height: 24px; 37 border-radius: 5px; 38 color: #fff; 39 font-size: 16px; 40 line-height: 22.5px; 41 font-family: 'Yu Gothic'; 42 font-weight: bold; 43 padding: 2px 9px; 44 margin-left: 96px; 45} 46 47.required2 { 48 background-color: #FF4646; 49 width: 55px; 50 height: 24px; 51 border-radius: 5px; 52 color: #fff; 53 font-size: 16px; 54 line-height: 22.5px; 55 font-family: 'Yu Gothic'; 56 font-weight: bold; 57 padding: 2px 9px; 58 margin-left: 52px; 59} 60 61.inputs { 62 width: 505px; 63 height: 22px; 64 float:right; 65 border: none; 66} 67 68.inputs_email { 69 width: 505px; 70 height: 22px; 71 float:right; 72 border: none; 73} 74 75input[type="text"],input[type="type"] { 76 border-bottom: 1px solid #3E3E3E; 77 opacity: 0.5; 78} 79 80input[type="email"] { 81 border-bottom: 1px solid #3E3E3E; 82} 83 84/* --- ラジオボタン --- */ 85 86input[type="radio"] { 87 display: none; 88} 89 90.radio-input { 91 margin-right: 60px; 92} 93 94.sex > .label_c { 95 margin-right: 240px; 96} 97 98.radio-input + label{ 99 font-size: 22px; 100 line-height: 22.5px; 101 font-family: 'Yu Gothic'; 102 font-weight: medium; 103 color: #3E3E3E; 104 padding-left: 20px; 105 position:relative; 106 margin-right: 70px; 107} 108 109/* 外枠 */ 110.radio-input + label::before{ 111 content: ""; 112 display: block; 113 position: absolute; 114 top: 7px; 115 left: -11px; 116 width: 12px; 117 height: 12px; 118 border: 1px solid #999; 119 border-radius: 50%; 120} 121 122/* 内枠 */ 123.radio-input:checked + label::after{ 124 content: ""; 125 display: block; 126 position: absolute; 127 top: 11px; 128 left: -7px; 129 width: 6px; 130 height: 6px; 131 background: #3B69FF; 132 border-radius: 50%; 133} 134 135.comment { 136 width: 780px; 137 height: 213px; 138 border: 1px solid #707070; 139 margin-top: 10px; 140} 141 142/* --- チェックボックス --- */ 143 144.checkbox { 145 margin-bottom: 30px; 146} 147 148.checkbox-input{ 149 display: none; 150} 151 152.checkbox-parts{ 153 padding-left: 42px; 154 position:relative; 155 margin-right: 20px; 156 color: #3E3E3E; 157 font-size: 18px; 158 line-height: 22.5px; 159 font-family: 'Yu Gothic'; 160} 161 162.checkbox-parts::before{ 163 content: ""; 164 display: block; 165 position: absolute; 166 top: 1.5px; 167 left: 0; 168 width: 18px; 169 height: 18px; 170 border: 1px solid #707070; 171 border-radius: 4px; 172} 173 174.checkbox-input:checked + .checkbox-parts::after{ 175 content: ""; 176 display: block; 177 position: absolute; 178 top: 0px; 179 left: 5px; 180 width: 7px; 181 height: 14px; 182 transform: rotate(40deg); 183 border-bottom: 3px solid #3B69FF; 184 border-right: 3px solid #3B69FF; 185} 186 187/* --- チェックボックスここまで --- */ 188 189.submitbtn { 190 background-color: #FFAA3B; 191 width: 174px; 192 height: 50px; 193 border-radius: 10px; 194 box-shadow: 0px 3px 5px #00000033; 195 color: #fff; 196 font-size: 18px; 197 line-height: 26px; 198 letter-spacing: 0.45px; 199 font-family: 'Yu Gothic'; 200 font-weight: bold; 201} 202 203::placeholder{ 204 color:#3E3E3E; 205 font-size: 22px; 206 line-height: 22.5px; 207 font-family: 'Yu Gothic'; 208 padding-left: 16px; 209 padding-bottom: 0; 210 opacity: 0.5; 211} 212 213.inputs_email::placeholder { 214 color: #3E3E3E; 215 opacity: 1; 216}

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

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

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

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

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

m.ts10806

2019/11/14 04:11

CSSはずすと動きますよね。 どのような意図でした指定ですか?
makosankibu

2019/11/14 04:54

私の環境ではその現象は再現できませんでした 記載されている他の個所に問題があるかもしれません
js_boy

2019/11/14 05:14

ご回答ありがとうございます。 他のところが影響を与えてる可能性があるので、セレクトタグ周辺のコードを追加いたしました。 再度ご確認いただけると幸いです。
js_boy

2019/11/14 05:17

なぜか同じブラウザ(Chrome)でも別のモニターで表示させると、セレクトはクリック時に展開致しました・・・。 なぜ・・・
makosankibu

2019/11/14 05:21

変更を反映させましたが、やはり再現できません。 どのような環境で動かしてますか? また、m.ts10806さんの質問にもお答えください。
js_boy

2019/11/14 05:28 編集

m.ts10806様 すみません、CSSはセレクトボックスの見た目を整えるために指定したものです。 makosankibu様 セレクトタグが動作しない環境は以下の通りです。 (ブラウザ) Chrome バージョン: 78.0.3904.97(Official Build) (64 ビット) (PC) OS : Windows10 パソコン:Surface Laptop (Editor) VScode 以下のモニターで表示させたら動作致しました。 K202HQL 以上になります。
makosankibu

2019/11/14 05:44

ごめんなさい、ちょっとわからないです。 htmlには問題なさそうなので、ウィンドウの大きさとかで他の要因があるのかな...と思いますがお力にはなれなそうです...
js_boy

2019/11/14 07:25

makosankibu様 いえいえ、とんでもないです。 ご回答ありがとうございました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問