Home > Web Front-end > HTML Tutorial > How to implement adaptive_html/css_WEB-ITnose

How to implement adaptive_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:08:44
Original
1231 people have browsed it

Please take a leave of absence, masters! ! !

How to adapt the label width according to the browser window size?
I'm in a hurry. . . .

For example, a website like this http://www.yohobuy.com/search?msort=2&misort=21&sort=124

Its li can be changed according to the size of the window, but the li The position will not shift
What is the implementation principle? .


Thank you everyone


Reply to discussion (solution)

width:100%

It’s controlled by js

There are two ways to adapt the width

One is to use a percentage instead of the specific amount px
The other is to use JS to determine the width of the current window and then allocate the width. .

The width is adaptive; that is width: 100%

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template