-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResponsive.html
More file actions
158 lines (133 loc) · 8.29 KB
/
Responsive.html
File metadata and controls
158 lines (133 loc) · 8.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!-- And now I am off the to f'in races!! -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="main.css">
<link rel="stylesheet" type="text/css" href="normalize.css">
<meta name="viewport" content="width=device-width, initial-scale=7">
<title>RESPONSIVE DESIGN</title>
</head>
<body>
<div id="sidebar">
<ul>
<li>Main page</li>
<li>Contents</li>
<li>Featured content</li>
<li>Current events</li>
<li>Random article</li>
<li>Donate to Wikipedia</li>
<li>Wikimedia Shop</li>
</ul>
<ul>
<h3>Interaction</h3>
<li>Help</li>
<li>About Wikipedia</li>
<li>Community portal</li>
<li>Recent changes</li>
<li>Contact page</li>
</ul>
<ul>
<h3>Toolbox</h3>
<li>What links here</li>
<li>Related changes</li>
<li>Upload file</li>
<li>Special pages</li>
<li>Permanent link</li>
<li>Page information</li>
<li>Data item</li>
<li>Cite this page</li>
</ul>
<ul>
<h3>Print/export</h3>
<li>Create a book</li>
<li>Download as PDF</li>
<li>Printable version</li>
</ul>
<ul>
<h3>Languages</h3>
<li>Català</li>
<li>Česky</li>
<li>Deutsch</li>
<li>Español</li>
<li>Français</li>
<li>Italiano</li>
<li>Nederlands</li>
<li>Português</li>
<li>Русский</li>
<li>Svenska</li>
<li>中文</li>
</ul>
</div>
<div id="mainBody">
<h1>Responsive web design</h1>
<h4>From Wikipedia, the free encyclopedia</h4>
<p class="filler text">Responsive web design (RWD) is a web design approach aimed at crafting sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from mobile phones to desktop computer monitors).
A site designed with RWD adapts the layout to the viewing environment by using fluid, proportion-based grids, flexible images, and CSS3 media queries, an extension of the @media rule.</p>
<div class="instruction-answer">
<nav>
<ul>
<li class="bar leftend"><a class="menu" href="#">Home</a></li>
<li class="bar"><a class="menu" href="#">Products</a></li>
<li class="bar"><a class="menu" href="#">About</a></li>
<li class="bar"><a class="menu" href="#">News</a></li>
<li class="bar rightend"><a class="menu" href="#">Contact</a></li>
</ul>
</nav>
</div>
<ul>
<li>The fluid grid concept calls for page element sizing to be in relative units like percentages, rather than absolute units like pixels or points.</li>
<li>Flexible images are also sized in relative units, so as to prevent them from displaying outside their containing element.</li>
<li>Media queries allow the page to use different CSS style rules based on characteristics of the device the site is being displayed on, most commonly the width of the browser.</li>
<li>Server-side components (RESS) in conjunction with client-side ones such as media queries can produce faster-loading sites for access over cellular networks and also deliver richer functionality/usability avoiding some of the pitfalls of device-side-only solutions.</li>
</ul>
<ol><h4>Contents</h4>
<li>1 Related concepts</li>
<li>1.1 Mobile first, unobtrusive JavaScript, and progressive enhancement</li>
<li>1.2 Progressive enhancement based on browser-, device-, or feature-detection</li>
<li>2 Challenges, and other approaches</li>
<li>3 History</li>
<li>4 See also</li>
<li>5 References</li>
</ol>
<h2>Related concepts</h2>
<h4>Mobile first, unobtrusive JavaScript, and progressive enhancement</h4>
<p class="section text">"Mobile first", unobtrusive JavaScript, and progressive enhancement (strategies for when a new site design is being considered) are related concepts that predated RWD: browsers of basic mobile phones do not understand JavaScript or media queries, so the recommended practice is to create a basic web site, and enhance it for smart phones and PCs—rather than try graceful degradation to make a complex, image-heavy site work on the most basic mobile phones.</p>
<h4>Progressive enhancement based on browser-, device-, or feature-detection</h4>
<p class="section text">Where a web site must support basic mobile devices that lack JavaScript, browser ("user agent") detection (also called "browser sniffing"), and mobile device detection are two ways of deducing if certain HTML and CSS features are supported (as a basis for progressive enhancement)—however, these methods are not completely reliable unless used in conjunction with a device capabilities database.</p>
<p class="section text">For more capable mobile phones and PCs, JavaScript frameworks like Modernizr, jQuery, and jQuery Mobile that can directly test browser support for HTML/CSS features (or identify the device or user agent) are popular. Polyfills can be used to add support for features—e.g. to support media queries (required for RWD), and enhance HTML5 support, on Internet Explorer. Feature detection also might not be completely reliable: some may report that a feature is available, when it is either missing or so poorly implemented that it is effectively nonfunctional.</p>
<h2>Challenges, and other approaches</h2>
<p class="section text">Luke Wroblewski has summarized some of the RWD and mobile design challenges, and created a catalog of multi-device layout patterns. He suggests that, compared with a simple RWD approach, device experience or RESS (responsive web design with server-side components) approaches can provide a user experience that is better optimized for mobile devices. Server-side "dynamic CSS" implementation of stylesheet languages like Sass or Incentivated's MML can be part of such an approach by accessing a server based API which handles the device (typically mobile handset) differences in conjunction with a device capabilities database in order to improve usability. RESS is more expensive to develop of course, requiring more than just client-side logic, and so tends to be reserved for organisations with larger budgets.</p>
<p class="section text">One problem for RWD is that banner advertisements and videos are not fluid. However search advertising and (banner) display advertising support specific device platform targeting and different advertisement size formats for desktop, smartphone, and basic mobile devices. Different landing page URLs can be used for different platforms, or Ajax can be used to display different advertisement variants on a page.</p>
<p class="section text">There are now many ways of validating and testing RWD designs, ranging from mobile site validators and mobile emulators to simultaneous testing tools like Adobe Edge Inspect. The Firefox browser and the Chrome console offer responsive design viewport resizing tools, as do third parties.</p>
<h2>History</h2>
<p class="section text">Ethan Marcotte coined the term responsive web design (RWD) in a May 2010 article in A List Apart. He described the theory and practice of responsive web design in his brief 2011 book titled Responsive Web Design. Responsive design was listed as #2 in Top Web Design Trends for 2012 by .net magazine after progressive enhancement at #1. They also listed 20 of Ethan Marcotte's favourite responsive sites.</p>
<p class="section text">Mashable called 2013 the Year of Responsive Web Design. Many other sources have recommended responsive design as a cost-effective alternative to mobile applications.</p>
<p class="section text">Forbes explains why you need to prioritize responsive design right now.</p>
<p class="section text">In late 2012, Google recommended responsive design in its Webmaster’s Guide: “Google recommends webmasters follow the industry best practice of using responsive web design, namely serving the same HTML for all devices and using only CSS media queries to decide the rendering on each device.”<p>
<h2>See also</h2>
</div>
<div id="photos2display">
<img class="fphoto" id="fpleft" src="same_right.jpg">
<img class="fphoto" id="pic" src="length.jpeg">
<img class="fphoto" id="fpright" src="same_left.jpg">
</div>
<div id="gallery">
<img class="sphoto" id="picleft" src="optical.jpeg">
<img class="sphoto" id="picright" src="dimension.jpeg">
</div>
</body>
<footer>
<div class="instruction-answer">
<nav>
<ul>
<li class="barf"><a class="menu" href="#">Home</a></li>
<li class="barf"><a class="menu" href="#">Products</a></li>
<li class="barf"><a class="menu" href="#">About</a></li>
<li class="barf"><a class="menu" href="#">News</a></li>
<li class="barf"><a class="menu" href="#">Contact</a></li>
</ul>
</nav>
</div>
</footer>
</html>