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