search
HomeWeb Front-endH5 Tutorial9 key points of responsive web design
9 key points of responsive web designApr 03, 2017 pm 02:43 PM
ResponsiveWeb 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
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
7款实用响应式Bootstrap电商源码模板(快来下载)7款实用响应式Bootstrap电商源码模板(快来下载)Aug 31, 2021 pm 02:13 PM

好看又实用的Bootstrap电商源码模板可以提高建站效率,下面本文给大家分享7款实用响应式Bootstrap电商源码,均可免费下载,欢迎大家使用!更多电商源码模板,请关注php中文网电商源码​栏目!

如何在Java 9中使用JavaFX来构建响应式UI界面如何在Java 9中使用JavaFX来构建响应式UI界面Jul 30, 2023 pm 06:36 PM

如何在Java9中使用JavaFX来构建响应式UI界面引言:在计算机应用程序的开发过程中,用户界面(UI)是非常重要的一部分。一个好的UI能够提升用户体验,使应用程序更具吸引力。JavaFX是Java平台上的一个图形用户界面(GUI)框架,它提供了一套丰富的工具和API来快速构建富有交互性的UI界面。在Java9中,JavaFX已经成为了JavaSE的

如何使用HTML和CSS创建一个响应式轮播图布局如何使用HTML和CSS创建一个响应式轮播图布局Oct 20, 2023 pm 04:24 PM

如何使用HTML和CSS创建一个响应式轮播图布局在现代的网页设计中,轮播图是一个常见的元素。它能够吸引用户的注意力,展示多个内容或图片,并且能够自动切换。在本文中,我们将介绍如何使用HTML和CSS创建一个响应式的轮播图布局。首先,我们需要创建一个基本的HTML结构,并添加所需的CSS样式。以下是一个简单的HTML结构:<!DOCTYPEhtml&g

手把手带你了解VUE响应式原理手把手带你了解VUE响应式原理Aug 26, 2022 pm 08:41 PM

本篇文章我们来了解 Vue2.X 响应式原理,然后我们来实现一个 vue 响应式原理(写的内容简单)实现步骤和注释写的很清晰,大家有兴趣可以耐心观看,希望对大家有所帮助!

使用Webman进行响应式网站开发的秘诀使用Webman进行响应式网站开发的秘诀Aug 14, 2023 pm 12:27 PM

使用Webman进行响应式网站开发的秘诀在当今数字化时代,人们越来越依赖于移动设备来访问互联网。为了提供更好的用户体验和适配不同尺寸的屏幕,响应式网站开发已经成为了一个重要的趋势。而Webman作为一个功能强大的框架,为我们提供了许多工具和技术来实现响应式网站的开发。在这篇文章中,我们将分享一些使用Webman进行响应式网站开发的秘诀,包括如何设置媒体查询、

如何使用Vue和Element-UI实现移动端响应式设计如何使用Vue和Element-UI实现移动端响应式设计Jul 21, 2023 am 10:49 AM

如何使用Vue和Element-UI实现移动端响应式设计随着移动设备的普及,移动端响应式设计变得越来越重要。Vue和Element-UI是两个非常流行的前端开发工具,可以帮助我们快速实现移动端响应式设计。本文将带领大家学习如何使用Vue和Element-UI来开发移动端响应式设计,并提供代码示例。一、搭建项目环境在开始之前,我们需要先搭建一个使用Vue和El

如何用Vue实现响应式UI设计?如何用Vue实现响应式UI设计?Jun 27, 2023 pm 02:35 PM

随着当今Web前端开发技术的快速发展,许多前端框架也随之迅速崛起。而Vue.js作为其中的一员,因其轻量、易上手、灵活、高效、响应式等特点,越来越被广大前端开发者所青睐。在Vue的帮助下,我们可以很方便地实现响应式UI设计,提升用户交互体验,下面我们来详细介绍一下。一、什么是响应式UI设计?响应式UI设计是一种页面设计方法,其主要目的是根据不同设备的屏幕大小

如何使用HTML和CSS创建一个响应式图片展示布局如何使用HTML和CSS创建一个响应式图片展示布局Oct 19, 2023 am 09:10 AM

如何使用HTML和CSS创建一个响应式图片展示布局在现代Web设计中,响应式布局已经成为一种标配,因为越来越多的人使用不同尺寸和分辨率的设备浏览网页。在本文中,我们将介绍如何使用HTML和CSS来创建一个响应式图片展示布局。首先,我们需要一个HTML文件来构建页面结构。在该文件中,我们使用HTML5的语义化标签来定义主要的布局结构。以下是一个简单的示例:&l

See all articles

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 agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),