The implementation of responsive layout is a very big leap in front-end engineering. Its very flexible moldability allows the same website to show different vitality on different terminal devices. Taking this opportunity today, I would like to share with you and discuss some elastic layout that are commonly used to implement responsive layout methods.
Flexible layout is a very convenient way to implement responsive layout that only relies on CSS styles. It is also the most commonly used method by K to implement responsive layout. Especially now, the pages of e-commerce websites or mobile apps such as Taobao and Taobao can be easily implemented using elastic layout. The following is a copy of Taobao’s mobile app using elastic layout. part of the page.
## As you can see, especially when small icons are arranged or areas are frequently divided, the flexibility The layout is very convenient. Next, K will take you to review the flexible layout (display:flex).
Flexible layout flex is an attribute value of display in CSS. By adding the display:flex; attribute to the parent container, you can achieve flexible layout of its child elements in the parent element. But it should be noted that the display:flex; style will only apply to the parent container and non-generational child containers that add this attribute. In other words, the dialog:flex; attribute on the parent container It will not cause flexible layout for the child elements in its immediate child elements. Generally speaking, a father can only control his son, but not his grandson. If we want to continue using flexible layout in the next layer, we can add the display:flex; attribute to the corresponding child element again to achieve this.
Flexible layout has corresponding attributes on the parent and child elements to regulate the "elasticity" of the child elements in the parent element.
On the parent element, the properties related to flexible layout that we often use mainly include flex-direction, flex-wrap, justify-content, align-items, align-content, These attributes regulate the flexibility of the item in the parent element from the direction of the main axis, whether to wrap, the alignment of the item on the main axis, the alignment of the item on the cross axis, and the alignment of the item on multiple axes.
On child elements, the properties related to flexible layout that we often use mainly include order, flex-grow, flex-shrink, flex-basis, and align-self. Each attribute regulates the flexibility of the project itself from the sorting of the project, the project enlargement ratio, the project reduction ratio, the main axis space occupied by the project, and the alignment of a single project on the cross axis.
You can find the specific attribute values and functions of the above in my blog (). Here I will tell you about some of the confusions I felt at the time.
(1) Main axis and cross axis. In flexible layout, the main axis and the direction of the main axis depend on the attribute value of the flex-direction attribute. It can be in the horizontal direction or the vertical direction, or it can be forward or positive. Reverse, here, friends who are exposed to this concept for the first time should pay attention. Never equate "main axis" with "horizontal forward", although the default value specified in CSS is like this. The cross axis represents the axis perpendicular to the main axis.
(2)Baseline. In the elastic layout, the word "baseline" is also mentioned. The baseline refers to the lower edge of the letter x. The so-called baseline alignment of many attribute values refers to aligning along the lower end of a lowercase x in a row, as if there is always a template for comparison.
(3) Multiple crossing axes. Multiple cross axes is a situation that may occur after the flex-wrap attribute is set to wrap, that is, multiple rows appear in the parent container, and each row has its own axis.
The above is some summary and insights of K on the use of flexible layout methods in implementing responsive layout. Next time, K will continue to discuss with you several other methods of implementing responsive layout.
The above is the detailed content of Introduction to flexible layout of responsive layout. For more information, please follow other related articles on the PHP Chinese website!

不同的电脑系统在调整屏幕亮度的操作方法上会有些不同,最近就有使用win7系统的网友不知道win7怎么调整屏幕亮度,看久了电脑眼睛比较酸痛。下面小编就教下大家win7调整屏幕亮度的方法。具体的操作步骤如下:1、点击win7电脑左下角的“开始”,在弹出的开始菜单中选择“控制面板”打开。2、在打开的控制面板中找到“电源选项”打开。3、也可以用鼠标右键电脑右下角的电源图标,在弹出的菜单中,点击“调整屏幕亮度”,如下图所示。两种方法都可以用。4、在打开的电源选项窗口的最下面可以看到屏幕亮度调整的滚动条,直

如果我们手头没有手机,只有电脑,但我们必须拍照,我们可以使用电脑内置的监控摄像头拍照,那么如何打开win10监控摄像头,事实上,我们只需要下载一个相机应用程序。打开win10监控摄像头的具体方法。win10监控摄像头打开照片的方法:1.首先,盘快捷键Win+i打开设置。2.打开后,进入个人隐私设置。3.然后在相机手机权限下打开访问限制。4.打开后,您只需打开相机应用软件。(如果没有,可以去微软店下载一个)5.打开后,如果计算机内置监控摄像头或组装了外部监控摄像头,则可以拍照。(因为人们没有安装摄

随着科技的不断发展,机器视觉技术在各个领域得到了广泛应用,如工业自动化、医疗诊断、安防监控等。Java作为一种流行的编程语言,其在机器视觉领域也有着重要的应用。本文将介绍基于Java的机器视觉实践和相关方法。一、Java在机器视觉中的应用Java作为一种跨平台的编程语言,具有跨操作系统、易于维护、高度可扩展等优点,对于机器视觉的应用具有一定的优越性。Java

目前有很多屏幕亮度调整软件,我们可以通过使用软件进行快速调整或者通过显示器上自带的亮度功能进行调整。以下是详细的Win7屏幕亮度调整方式,您可以通过教程中的方法进行快速调整即可。Win7系统电脑怎么调节屏幕亮度教程:1、依次点击“计算机—右键—控制面板”,如果没有也可以在搜索框中进行搜索。2、点击控制面板下的“硬件和声音”,或者点击“外观和个性化”都可以。3、点击“NVIDIA控制面板”,有些显卡可能是AMD或者Intel的,请根据实际情况选择。4、调节图示中亮度滑块即可。5、还有一种方法,就是

Go语言是近年来备受青睐的编程语言,因其简洁、高效、并发等特点而备受开发者喜爱。其中,方法(Method)也是Go语言中非常重要的概念。接下来,本文就将详细介绍Go语言中方法的定义和使用。一、方法的定义Go语言中的方法是带有接收器(Receiver)的函数,它是一个与某个类型绑定的函数。接收器可以是值类型或者指针类型。用于接收者的参数可以在方法名

PHP是一个广泛使用的服务器端编程语言,它的许多功能和特性可以将其用于各种任务,包括文件下载。在本文中,我们将了解如何使用PHP创建文件下载脚本,并解决文件下载过程中可能出现的常见问题。一、文件下载方法要在PHP中下载文件,我们需要创建一个PHP脚本。让我们看一下如何实现这一点。创建下载文件的链接通过HTML或PHP在页面上创建一个链接,让用户能够下载文件。

如今微软的Windows系统已经更新换代到了Windows10版本。很多以前还在使用Windows7系统的用户都想体验这个新版本Windows10系统。下面小编就来说说如何下载win10系统下载的方法,大家快来看看。1、首先下载一个小白重装系统软件,然后点击在线重装,下载win10系统。2、然后就开始系统镜像的下载了。3、系统镜像下载完成就是环境部署了。然后win10系统就下载完成啦。4、重启之后开始安装系统,安装完成就能进入桌面咯。以上就是如何下载win10系统的方法介绍啦,希望能帮助到大家。

随着前端开发的快速发展,越来越多的框架被用来构建复杂的Web应用程序。Vue.js是流行的前端框架之一,它提供了许多功能和工具来简化开发人员构建高质量的Web应用程序。createApp()方法是Vue.js中的一个核心方法之一,它提供了一种简单的方式来创建Vue实例和应用程序。本文将深入探讨Vue中createApp方法的作用,其如何使用以及使用时需要了解


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Linux new version
SublimeText3 Linux latest version

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
