Table of Contents
Reply to discussion (solution)
Home Web Front-end HTML Tutorial Let the experts answer the adaptive screen questions! _html/css_WEB-ITnose

Let the experts answer the adaptive screen questions! _html/css_WEB-ITnose

Jun 24, 2016 pm 12:14 PM

I don’t know much about adaptively adapting to screens of different sizes. (It seems 100% possible, but you have to be careful... Is there any other way besides this?)

Two computers, ( Desktop, the screen is about 21 inches, notebook, about 14 inches)
Let me give you a small personal example:
I copied a website and used other people’s background pictures! His background image is 1830*1650 (this website http://rappelz.eaglegamesea.com/)

I have tried two methods

1: Fixed value, that is, changing the width and height All are given, but scroll bars will appear.
2:100% I don’t know if I don’t know how to set this up or something? Only half of the picture appears.

So, hey, I don’t know much about adaptiveness! , please master!





Reply to discussion (solution)

100%

One more thing, I am now I am using a laptop, but I copied this website for my friend, and he seems to be a desktop model

Another sentence, I am using a notebook now, but I copied this website for my friend, and he seems to be a desktop model
Use relative layout, he uses 17 to 19 inches, which means stretching, if you want to fill the screen
But generally you don’t need to do this, it just satisfies most people, CSDN, isn’t this grid a fixed width?
The larger the resolution of the monitor, the more blank space will be on both sides. This is normal

Well, I also understand that it’s OK if most of them are satisfied, but there is one necessity (that is, no horizontal scroll bar appears)
Quoting the reply from the 2nd floor:

Another sentence, I am using a laptop now, but I helped my friend imitate this website. He seems to be on a desktop.

Using relative layout, he uses 17 19 inches, it is stretched, if you want to fill the screen
But generally you don’t need to do this, it just satisfies most people, CSDN, isn’t this grid a fixed width?
The larger the display resolution, the more blank space on both sides. Many, this is normal

Please give me an example. . Dear, the background is made with the width and height given above.
Quote from the 2nd floor’s reply:

Another sentence, I am using a laptop now, but I helped my friend imitate this website. He seems to be using a desktop version

Using relative layout, he If you use 17 or 19 inches, it will be stretched. If you want to fill the screen
But generally you don’t need to do this. It just satisfies most people. CSDN, isn’t this grid a fixed width?
The display resolution is large There is a lot of white space on both sides, which is normal

There is also a demo, you just need to know the width,


800*600 , keep the width of the web page within 778, there will be no horizontal scroll bar, and the height will depend on the layout and content.
Under 1024*768, the width of the web page is kept within 1002. If the full frame is displayed, the height is between 612-615. There will be no horizontal scroll bar or vertical scroll bar.
When you make a web page in PS, you can display it in full screen at 800*600, and there will be no sliding bar at the bottom of the page. The size is about 740*560
The pictures made in PS are different when they are online. In terms of colors, etc., because only 256 WEB safe colors are used on the WEB, while the RGB or CMYK and LAB or HSB color gamut in PS are very wide, so there will naturally be a phenomenon of color loss.
Page standard press Made with 800*600 resolution, the actual size is 778*434px

800*600 is generally the big PP in old Internet cafes, so let’s use 1024*768 as the standard, the maximum width is 1002

Stretch (customized size based on percentage)
Adsorption (fixed in any of the four directions)
Sequential (more or less natural arrangement of the content)
Multi-style sheets (prepared differently according to the size of the device screen) Supplementary style sheet)

Finally, don’t think that different device screens need to have the same display. It’s ok if the main content remains unchanged

That’s basically it.

Can explain What! ~!
Stretch (customized size based on percentage)
Adsorption (fixed in any of the four directions)
Sequential (more or less natural arrangement of the content)
Multiple style sheets (according to the device screen Prepare supplementary style sheets of different sizes)

Finally, don’t think that different device screens should have the same display. It’s ok if the main content remains unchanged

That’s basically it

Let’s go like this Understand, if the background image is: width: 1024, height: 900. If you set the page to 100%, it will be just right on a 1024*900 resolution screen. If it is 1368*760, the background image will repeat horizontally and vertically. (When no other css conditions are set). It is generally not recommended to use adaptive layout, but the navigation and bottom can be adaptive. It's because it's difficult to control the layout adaptively.

You can set the layout mode to position: absolute;top:0px;left:0px;right:0px;bottom:0px; which is full-screen adaptive, and then set the specific layout mode inside. I did it This is what is done when adapting. . .

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

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 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
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)

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

How do I use the HTML5 <time> element to represent dates and times semantically? How do I use the HTML5 <time> element to represent dates and times semantically? Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 &lt;time&gt; element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

See all articles