
オートコンプリートの背景色を透明にしたいのですが、黄色のまま変わりません。普通に検索する時は透明のままです。
css
1.search_container{ 2 box-sizing: border-box; 3 position: relative; 4 border: 1px solid #999; 5 padding: 3px 10px; 6 border-radius: 20px; 7 height: 3em; 8 width: 300px; 9 overflow: hidden; 10 } 11 .search_container input[type="text"]{ 12 border: none; 13 height: 2.6em; 14 background: none; 15 color:white; 16 } 17 .search_container input[type="text"]:focus { 18 outline: 0; 19 } 20 .search_container input[type="submit"]{ 21 cursor: pointer; 22 font-family: FontAwesome; 23 font-size: 1.7em; 24 border: none; 25 background: none; 26 color: #3879D9; 27 position: absolute; 28 width: 1.5em; 29 height: 2.2em; 30 right: 0; 31 top: -10px; 32 outline : none; 33 }
html
1<form method="get" action="{{ route('posts.search') }}" class="search_container"> 2 <div class="input-group"> 3 <input type="text" size="30" placeholder="キーワード検索" name="search" > 4 <input type="submit" value="" > 5 </div> 6</form>
同じような悩みを検索し、
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px transparent inset;
}
または、
input:-webkit-autofill {
background:rgba(255,255,255,0) !important;
}
を記載してみたのですが、うまくいきませんでした。
回答お待ちしております。
回答1件
あなたの回答
tips
プレビュー