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
Responsive Web Design in a Nutshell
Search
Erik Frisk
September 05, 2013
Programming
460
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Responsive Web Design in a Nutshell
Erik Frisk
September 05, 2013
Transcript
26 slides
Responsive Web Design ... in a nutshell. leanmachine.se ▪
[email protected]
▪ 2013-09-06
What’s all the fuss about?
None
Our websites need to work on all devices
Responsive vs. Adaptive
Responsive vs. Adaptive Layout is fluid. Media queries are used
to change the layout when it “breaks down”
Responsive vs. Adaptive A set of pre-defined layout widths is
used. No fluid layout. Layout is fluid. Media queries are used to change the layout when it “breaks down”
http://liquidapsive.com/ Super sweet demo
Mixed Approach Fixed width layouts for large and medium. Fluid
layout for small.
How do I make my site responsive?
1 The Viewport Meta Tag <meta name="viewport" content="width=device-width, initial-scale=1">
2 Percentages in CSS .main-content { width: 67%; } .side-column
{ width: 33%; }
3 CSS Media Queries div.content { width: 1100px; margin: 0
auto; } /* Large monitors */ @media screen and (min-width: 1600px) { div.content { width: 1440px; } } ... /* Tablets in portrait */ @media screen and (min-width: 761px) and (max-width: 990px) { div.content { width: 740px; } } /* Mobile */ @media screen and (max-width: 760px) { div.content { width: 100%; } }
4 Responsiveness in JavaScript // Detect screen size // ------------------
if (window.innerWidth < 768) { // Do stuff specific to mobile } // ... or use enquire.js // --------------------- enquire.register("screen and (min-width:768px)", function() { // Load sidebar content in via AJAX. // Show sidebar });
Responsive Design Patterns
1 2 3 1 2 3
http://bradfrost.github.io/this-is-responsive/patterns.html Tons of examples
Useful Tools
Front-end Frameworks
None
Front-end Frameworks Fast and easy to get started. +
Front-end Frameworks Fast and easy to get started. + Pollutes
your HTML and can limit you. –
https://github.com/scottjehl/Respond Respond.js Makes old browsers (IE8-) support Media Queries.
Responsive Web Safari!
1. http://trentwalton.com/ 2. http://www.bostonglobe.com/ 3. https://corporate.target.com/ 4. http://css-tricks.com/ 5. http://elliotjaystocks.com/
6. http://www.leanmachine.se/ 7. http://www.awwwards.com/ 8. http://www.squarespace.com/stories 9. http://www.jessicahische.is/ 10. http://forefathersgroup.com/ 11. http://palantir.net/ 12. http://www.ampersandconf.com/
leanmachine.se ▪
[email protected]
▪ 2013-09-06
More Decks by Erik Frisk
See All by Erik Frisk
Seven UX Design Rules
erikfrisk
10
470
The Science of Design
erikfrisk
3
240
Organizing Stylesheets with CSS Pre-processors
erikfrisk
0
210
Intro to HTML5
erikfrisk
2
170
Graceful Degradation with Modernizr
erikfrisk
1
180
Customer On-boarding in Practice
erikfrisk
2
160
Other Decks in Programming
See All in Programming
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
180
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
0
250
AI-Powered Domain-Driven Design
ziobrando
0
450
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
340
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
120
Performance Optimization With LLMs
xleitix
0
260
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.7k
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
170
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
330
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
The Pragmatic Product Professional
lauravandoore
37
7.5k
Design in an AI World
tapps
1
390
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
BBQ
matthewcrist
90
10k
Side Projects
sachag
456
43k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
240
Designing for Timeless Needs
cassininazir
1
560
Into the Great Unknown - MozCon
thekraken
41
2.8k
Technical Leadership for Architectural Decision Making
baasie
4
650
Building Applications with DynamoDB
mza
96
7.3k