Get the App
SLTechnology News&Howtos  ›  Development  › 

The processing method of adaptive layout

Shulou Source: shulou.com Published: 2022-06-03 06:57:25 10月03日 Update

This article introduces the relevant knowledge of "the processing method of adaptive layout". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Fixed on the left and adaptive on the right (implementation of the Grail layout):

The code is as follows:

Untitled document

Body {margin:0;padding:0}

.wrap {width:100%; float:left}

.content {height:300px;background:green; margin-left:200px}

.right {width:200px; height:300px; background:red; float:left; margin-left:-100%}

Content

Aside

two。 Fixed on the right and adaptive on the left (implementation of the Grail layout):

The code is as follows:

Untitled document

Body {margin:0;padding:0}

.wrap {width:100%; float:left}

.content {height:300px;background:green; margin-right:200px}

.right {width:200px; height:300px; background:red; float:left; margin-left:-200px;}

Content

Aside

3. Fixed on the left and right, adaptive in the middle:

The code is as follows:

Untitled document

Body {margin:0;padding:0}

.wrap {width:100%; float:left}

.content {height:300px;background:green; margin-left:200px;margin-right:200px}

.left {width:200px; height:300px; float:left; background:yellow; margin-left:-100%}

.right {width:200px; height:300px; background:red; float:left; margin-left:-200px}

Content

Aside

Aside

This is the end of the content of "the processing method of adaptive layout". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Layout code right document title method processing content more knowledge holy grail utility achievement next dilemma reality situation article case editing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Linux Huawei Docker vpn