search
HomeWeb Front-endHTML TutorialLet the experts answer the adaptive screen questions! _html/css_WEB-ITnose

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
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
HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The Role of HTML: Structuring Web ContentThe Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AM

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

HTML and Code: A Closer Look at the TerminologyHTML and Code: A Closer Look at the TerminologyApr 10, 2025 am 09:28 AM

HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract

HTML, CSS, and JavaScript: Essential Tools for Web DevelopersHTML, CSS, and JavaScript: Essential Tools for Web DevelopersApr 09, 2025 am 12:12 AM

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

The Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesThe Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesApr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

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

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MantisBT

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.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment