A page adaptive layout method based on VW characteristics

By using a page adaptive layout method based on VW characteristics and leveraging the proportional relationship between VW and rem units, fine-grained adaptation of web page elements to different screen resolutions is achieved. This solves the problems of high development complexity and poor adaptive effect in existing technologies, reduces development costs and workload, and improves development efficiency.

CN115202657BActive Publication Date: 2026-06-12SHANGHAI TRUELAND INFORMATION & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI TRUELAND INFORMATION & TECH CO LTD
Filing Date
2022-07-15
Publication Date
2026-06-12

Smart Images

  • Figure CN115202657B_ABST
    Figure CN115202657B_ABST
Patent Text Reader

Abstract

The application discloses a page self-adaptive layout method based on VW characteristics, relates to the technical field of webpage layout, and comprises the following steps: measuring the total width of a design drawing, and setting the size of the font-size of a root element under the width of the design drawing; calculating and converting the set value of the font-size of the root element into vw; wherein the vw is a window width, and 100vw is equal to the total width of the design drawing; setting the font-size attribute of the root element html, and the attribute value is the conversion value calculated above; setting the attribute unit of the size of non-root elements as rem by referring to the attribute value size of the font-size of the root element; wherein the attribute value size of the font-size of the root element is equal to 1rem; other elements call rem, and can be adjusted according to the adaptive proportion; the development cost is low, one set of css styles is suitable for various screens, the self-adaptive effect is good, and the page development efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art