Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
position: fixed;を上手に飼う方法
Search
usagi-f
February 21, 2015
Programming
380
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
position: fixed;を上手に飼う方法
usagi-f
February 21, 2015
More Decks by usagi-f
See All by usagi-f
フロントエンド実装から見たAtomic Design開発のポイント
usagif
3
7k
Take into Accessibility in React
usagif
1
720
platoを使ったコードメトリクス生成
usagif
0
320
How Github works and How Google works
usagif
0
140
良いUIをエンジニアに作ってもらうために、デザイナーができること
usagif
1
87
DMMで新規サービス作ったらフロントエンドエンジニアの重要性が浮き彫りになった話 - DMM Study night
usagif
0
120
Frontend summary in 2015 summer
usagif
0
59
なるべく噛み砕いたGit基礎講習
usagif
1
88
Other Decks in Programming
See All in Programming
Intent as Code
shoppingjaws
6
1k
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
580
A2UI for Android: Safely Rendering AI-Generated UI with Jetpack Compose - DroidKaigi 2026
itsmedreamwalker
0
140
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
250
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
280
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
460
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
150
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.2k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
0
620
FreeBSDでZabbixを動かす
kenkino
0
290
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
200
Are APIs Still Relevant in the AI Era?
soyuka
0
230
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Everyday Curiosity
cassininazir
0
320
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
280
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
320
Building AI with AI
inesmontani
PRO
1
1.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
540
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
330
Git: the NoSQL Database
bkeepers
PRO
432
67k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
520
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Transcript
position: fixed;を上手に飼う方法 2015.02.21 Frontrend Conference DMM.com Labo 石橋啓太
DMM.com Labo デザイナー ! 昔はバナーとか作ってたけど、 フロントエンド技術に興味がでてきた人。 ! コーダーだったり、UI考えたり、アプリ作ったり。 ! 最近AngularJSいじくってます。
石橋 啓太 ishibashi keita
固定表示の実装でハマったこと ありますか?
固定表示の実装でハマったこと ありますか? あるある
かわいいアイツ UETQNN UETQNN fixed fixed
自由自在に扱えるように fixedについてもっと知ろう! !
position: fixed;の中身
position: fixed;の中身 absoluteと同じ絶対配置 基準にするのはviewport
.red { position: fixed; left: 0; bottom: 0; width: 100%;
} position: fixed;の中身 fixed 基準値:viewport UETQNN body div
position: fixed;の中身 やってること 大体おなじ なーんだ。
viewportってなんだっけ あー、知ってる知ってる。 アレでしょ?アレ。
PC ウィンドウエリア=viewport viewportってなんだっけ
スマホ ウィンドウ……? viewportってなんだっけ
visual viewport layout viewport 実際の表示領域(ズーム時含む) metaタグによって設定される ズームした時の挙動について デバイス・OS毎に大きく異なるので ピンチイン許可する場合は要注意! !
スマホ viewportってなんだっけ
上手に飼うにはどうすれば?
上手に飼うにはどうすれば? 以下の要素は要注意! <textarea> <input> <button> <select> position(入れ子) transform (ハードウェアアクセラレータ) z-index
<input type=“text”> <textarea> <button> fixed 中身もりもりの固定要素を丸ごと動かす! これをtransformで動かしたい! 例:
fixed positionプロパティが入れ子状態で乱立! 例: absolute relative absolute
fixed 適当なz-index値の設定でおかしくなる 例: <div>
上手に飼うにはどうすれば? formへのフォーカス formからformへの移動 スクロール ズーム Javascript
上手に飼うにはどうすれば? 固定する要素はシンプルに デバイス独自の挙動を考慮する
ଞͷཁૉͷӨڹΛड͚͍͢ʂ େن։ൃͷࡍ৻ॏʹ࣮͠·͠ΐ͏ʂ
THANK YOU ! ありがとうございました。