Responsive page design reference material http://www.qianduan.net/responsive-web-design.html
The principle is to set different display styles based on different browser widths and pages.
Simulate using JS
Doctype html > Html > Head > Title > CSS width Title > Style Type = "Text/CSS" > . Divtest { Border : Solid 2px gray ; Width
How to implement responsive web design with CSS3:It is divided into three steps:(1) Allow Web page width to be adjusted automatically. First in the page header, we need to add this line: (2) Flow layout. Do not use absolute width layout and font size, that is, in the code in CSS, the definition width and height can not use PX (WIDTH:PX) can only use the percentage (width:%) or (Width:auto) defined high widt
Second discussion"Responsive Design"Centrally create the picture layout size of the page, intelligently based on user behavior and the device environment used (System platform, screen size, screen orientation, etc.) corresponding to the layout.Responsive layout:Meta Tag utility: Set layout width equal to device width,
;}}
The notation is preceded by a @media, and the other is the same as the media attribute in link.Max WidthThe following styles are applied when the width of the viewable area is less than 600px.
123456
@media screen and (max-width: 600px) {.class {background: #fff;你的样式}}
Min WidthThe following styles are applied when the width of the viewable area is greater than 900px.
12345
@media
Mobile web development: rem responsive design and web development rem response
I use sass to write css as follows:
1. variable. scss
Define a variable $ base_fontSize in the variable. scss file to set the basic font size (I am using the percentage, that is, multiply the percentage by the default browser font value ).
//font-size$base_fontSize:62.5%;
2. base. scss
In base. introduce the above variable file i
1.user-scalable: Whether the user can scale manually.The 2.box-sizing property allows you to define certain elements in some way to fit the specified area. Specify the width and height of the box, and place the border and padding into the box.[email protected] to set different styles for different screen sizes4. Modify the background presentation (Background-color) If the document width is less than 300 pixels:@media
Today's screen resolution, as small as 320px (IPhone), large to 2560px or even higher (large display), the range is great. In addition to the use of traditional desktops, users will be more and more throughMobile Phone, netbooks, ipad-type tablet devices to browse the page. In this case, the fixed width of the design will appear more unreasonable. The page needs to be more adaptable, and its layout structur
Media query can be based on the characteristics of the device display (viewport width, screen size, device direction-horizontal or vertical, etc.) for its CSS style
Why response design requires media queries. Because there is no CSS3 media query module, you cannot set specific CSS styles for device features (especially the viewport width)
Bootstrap.css file The last several lines, is about the media query c
might be amazed at the number of browsers supported, such as Mozilla Firefox 3.6+, Apple Safari 5+, Google Chrome, ie9+ and opera11+. But the poor ie6-8 cannot, and you will make them transparent, I have always been so.However, the use of units to set the font, can not completely consider IE, if you want to use this REM, but also want to be compatible with the effect of IE, you can consider "px" and "REM" with the use of "px" to achieve ie6-8 effect, and then use "REM" to achieve the effect of
I. Mobile First Mobile phone design is usually more minimalist, from the mobile phone design to start making a simple version, with the introduction of tablet and desktop, the page slowly complex, this is an incremental process, the initial focus on the core module, the default open simple phone style, and the responsible style wrapped in media query, so will not load, So the access speed is the best . Con
Start to study responsive web design. css3 media queries is an entry.
Media queries allows you to add expressions to determine the media environment and apply different style sheets. In other words, it allows us to change the page layout without changing the content to precisely adapt to different devices.
How does media queries work?
Either way, you can determine the device size directly in the link
than 800px, cancel the left and right floating of #mian and #sidebar, Width automatically, become a single-column layout, reduce the font line higher */@media screen and (max-width:800px) { #main, #sidebar { float: none; Width: auto; padding: 0; font-size: . 9em; line-height: 1.5; } }/* When the page width is less than 550px, it is often necessary to center the logo, set a small amount of space on both
resolution of your mobile device is, what you see is what you gain and cannot change the size.name= "Viewport" ID= "Yourviewportid" content= " Width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no "/>Responsive design, we plan to do 3 templates, large (browser width is greater than 1118px)/middle (700px~1118px)/small ({/*Add your CSS styleshere*/} {/*Add your CSS
broadcastreceiver declaration cycle is very short. By the way, you should avoid starting an activity in an intent worker, because this will generate a new screen, so that the user's current running program will lose focus. If your application needs to display some information to the user when responding to an intent broadcast, you can consider using the notification manager ).
Reinforcing responsiveness (enhanced responsiveness) Generally,-millisecon
when the width of the viewable area is greater than 900px.
12345
@mediascreenand (min-width:900px) {.class {background:#666;}}
Multiple Media QueriesYou can also use a match condition where the following style is applied when the width of the viewable area is between 600px and 900px.
12345
@mediascreenand (min-width:600px) and (max-width:900px) {.class {background:#333;}}
Device WidthThe following style is triggered on a device wit
css014 Response Type Web DesignFirst, Response Type Web basic knowledge of design1, RWD three ideas: A, for the layout of the elastic network, B, for pictures and video of the elastic Media, C, for different screen width created by different styles of CSS media query.Second, to be RWD Building Web pages1, mobile browser in order to ignore the mobile browser screen smaller font also become smaller behavior,
1. Media queries can be used in link tab and specific CSS;2. Use the media property of the 3. Viewport width (width) screen width (device-width) The former refers to the width of the toolbar (the part that completely displays the content of the page), which refers to the width or resolution of the screen4.-----------------the target element width ÷ the width of the context element = percent Width----------------------The specific approach is to select
More and more people use mobile phones or tablets to browse Web pages. The website needs to be adjusted so that people can read their content without the mouse or keyboard. Generally, the response is "Isn't it just another independent mobile phone user interface !", In the past, this solution was quite effective when mobile phones were relatively small, but it was very short-sighted for big screen mobile phones and tablets.
This article will show you
different sizes of the screen, according to the width of the screen, automatically adjust the layout?I. The concept of "adaptive web Design"In 2010, Ethan Marcotte proposed the term "adaptive web Design" (Responsive web
the first screen.
The Dodge picture color helps highlight text. All text should be easy to read and play a role.
Deep design of the first screen big picture, let the user know what to do next-click or scroll. To include some visual cues. Remember, the big picture is not necessarily full of the screen;
Create a larg
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.