Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
検索ボックスを選択した後、モバイル デバイスのページの残りの一番上の行を占めるように全方向に展開する必要があります。HTML5、CSS3、および単純な Javascript (ライブラリなし) を使用したいです。それを実装する方法は?
道に迷いました。javascriptを使用して検索ボックスを上に移動しました。 以下の関数でobjとしてテキストボックスを渡しました。動作します!!!
function findPos(obj) { var curtop = 0; if (obj.offsetParent) { do { curtop += obj.offsetTop; } while (obj = obj.offsetParent); curtop=curtop-5; return [curtop]; } }