Home Web Front-end H5 Tutorial 9 key points of responsive web design

9 key points of responsive web design

Apr 03, 2017 pm 02:43 PM
Responsive Web Design

Responsive Web Design is a great solution to the multi-screen problem, but is a bit difficult from a print perspective. There are no fixed page sizes, no millimeters or inches, no physical limitations, no way to start. The exclusive use of pixel design methods for desktop and mobile is also a thing of the past, as more and more devices can open websites. Therefore, we need to clarify some of the basic principles of responsive web design and accept fluid web pages instead of fighting them. 1. Responsive vs Adaptive Web Design

They may seem to be the same, but they are not. These two methods complement each other. There is no saying which one is correct and which one is wrong. Content determines everything.

2. Content flow

As the screen size becomes smaller, the content will occupy more vertical space, and the content below will be pushed downwards. This is the so-called flow. . This can be a little tricky if you're designing with pixels and points, but once you get used to it, it will make sense.

3. Relative unit

The canvas size can be desktop, mobile or any size between them. Pixel density can also vary, so we need flexible units that can be used on a variety of screens. This is where relative units like percentages come in handy. So setting a width of 50% means it will take up half of the screen (or

View

, which is the size of the open browser window). 4. Breakpoints

Breakpoints allow layout changes at predefined points. For example: there are 3 columns on the desktop screen, but there is only one column on the mobile screen. Most CSS

properties

can be changed based on breakpoints. Typically you would set breakpoints based on specific content. If a sentence exceeds the screen length, you may want to add a breakpoint. But use breakpoints with caution—it can quickly lead to confusion when it's difficult to understand what affects what. 5. Maximum and Minimum Values

Sometimes it is good if the content takes up the entire width of the screen, such as on mobile devices. But if it's on a TV screen and the same content occupies the entire width of your screen, it usually doesn't make much sense. This is where the Min/Max values ​​come into play. For example, if

width

is set to 100%, and then max-width is 1000px, then the content will fill the screen, but will not exceed 1000px. 6. Nested

Objects

Do you remember the relative position? It is difficult to control the positioning of many elements depending on the positioning of

other

elements, so using containers to wrap elements can make it easier to understand and tidier. This is where static units (such as pixels) come into play. They are useful for content that you don't want modular (like a logo or a button). 7.Mobile or Desktop priority

Technically, if a project starts with a smaller screen and becomes a larger screen (mobile first), or vice versa (Desktop takes precedence), there is not much difference. However, it adds additional restrictions that can help you decide whether to start with mobile first. Usually everyone writes both ends together at the beginning, so it’s better to see which one runs better.

8. Web Fonts vs System Fonts

Wish you had a cool Futura or Didot font on your website? Web fonts are available! While they look great, remember that the more fonts you put in, the longer your page will take to load. On the other hand, loading system fonts is lightning fast, but when the user doesn't have the set of fonts locally, it falls back to the default font.

9. Bitmap vs

Vector image

Have you ever thought about adding a lot of details and fancy effects to your icons? If you think about it, using bitmaps is more appropriate. If not, consider using vector graphics. For bitmaps, use images in jpg, png or gif format, while for vectors, your best choice is SVG or icon fonts. Each has corresponding advantages and disadvantages. But the size of

images

also needs attention - images on web pages must be optimized. On the other hand, vector images are usually smaller, but some older browsers do not support them. Also, it may be heavier than a bitmap if it has a lot of curves. So, choose carefully.

The above is the detailed content of 9 key points of responsive web design. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Tutorial on using CSS to implement responsive image automatic carousel effect Tutorial on using CSS to implement responsive image automatic carousel effect Nov 21, 2023 am 08:37 AM

With the popularity of mobile devices, web design needs to take into account factors such as device resolution and screen size of different terminals to achieve a good user experience. When implementing responsive design of a website, it is often necessary to use the image carousel effect to display the content of multiple images in a limited visual window, and at the same time, it can also enhance the visual effect of the website. This article will introduce how to use CSS to achieve a responsive image automatic carousel effect, and provide code examples and analysis. Implementation ideas The implementation of responsive image carousel can be implemented through CSS flex layout. exist

Tutorial on implementing responsive sliding menu using CSS Tutorial on implementing responsive sliding menu using CSS Nov 21, 2023 am 08:08 AM

A tutorial on using CSS to implement a responsive sliding menu requires specific code examples. In modern web design, responsive design has become an essential skill. To accommodate different devices and screen sizes, we need to add a responsive menu to the website. Today, we will use CSS to implement a responsive sliding menu and provide you with specific code examples. First, let's take a look at the implementation. We will create a navigation bar that automatically collapses when the screen width is smaller than a certain threshold and expands by clicking the menu button.

How to create a responsive tag cloud using HTML, CSS and jQuery How to create a responsive tag cloud using HTML, CSS and jQuery Oct 27, 2023 am 10:46 AM

How to use HTML, CSS and jQuery to create a responsive tag cloud. A tag cloud is a common web element used to display various keywords or tags. It usually displays the importance of keywords in different font sizes or colors. In this article, we will introduce how to use HTML, CSS and jQuery to create a responsive tag cloud, and give specific code examples. Creating the HTML Structure First, we need to create the basic structure of the tag cloud in HTML. You can use an unordered list to represent tags

How to create a responsive carousel layout using HTML and CSS How to create a responsive carousel layout using HTML and CSS Oct 20, 2023 pm 04:24 PM

How to create a responsive carousel layout using HTML and CSS Carousels are a common element in modern web design. It can attract the user's attention, display multiple contents or images, and switch automatically. In this article, we will introduce how to create a responsive carousel layout using HTML and CSS. First, we need to create a basic HTML structure and add the required CSS styles. The following is a simple HTML structure: <!DOCTYPEhtml&g

How to create a responsive scrolling notification bar using HTML, CSS and jQuery How to create a responsive scrolling notification bar using HTML, CSS and jQuery Oct 26, 2023 pm 12:12 PM

How to use HTML, CSS and jQuery to create a responsive scrolling notification bar. With the popularity of mobile devices and the increase in user requirements for website access experience, designing a responsive scrolling notification bar has become more and more important. Responsive design ensures that the website displays properly on different devices and that users can easily view notification content. This article will introduce how to use HTML, CSS and jQuery to create a responsive scrolling notification bar, and provide specific code examples. First we need to create the HTM

How to use Layui to implement responsive calendar functions How to use Layui to implement responsive calendar functions Oct 25, 2023 pm 12:06 PM

How to use Layui to implement responsive calendar function 1. Introduction In web development, calendar function is one of the common requirements. Layui is an excellent front-end framework that provides a wealth of UI components, including calendar components. This article will introduce how to use Layui to implement a responsive calendar function and give specific code examples. 2. HTML structure In order to implement the calendar function, we first need to create a suitable HTML structure. You can use the div element as the outermost container, and then within it

How to create a responsive music player page layout using HTML and CSS How to create a responsive music player page layout using HTML and CSS Oct 25, 2023 am 08:27 AM

How to use HTML and CSS to create a responsive music player page layout The development of the Internet has made music players an indispensable part of people's lives. HTML and CSS are indispensable tools when it comes to creating an excellent music player page layout. This article will introduce how to use HTML and CSS to create a responsive music player page layout, and give specific code examples. Page Structure First, we need to create an HTML document and define the basic structure of the page. The following is a brief

How to make a responsive music playlist using HTML, CSS and jQuery How to make a responsive music playlist using HTML, CSS and jQuery Oct 25, 2023 am 09:25 AM

How to make a responsive music playlist using HTML, CSS and jQuery In modern society, music has become an indispensable part of people's lives. In order to facilitate users to enjoy their favorite music anytime and anywhere, it is very necessary to create a responsive music playlist. In this article, we will introduce how to use HTML, CSS and jQuery to make a music playlist with responsive design, and provide detailed code examples. Step 1: HTML structure design First, we need to design

See all articles