摘要
针对传统的基于模板的Web页面移动端适配方法中无法处理过于复杂的页面问题,本文提出了一种基于模块化样式模板匹配的混合式适配方法。该方法首先对构成网页的页面块进行归类,并对每一类设计适合在移动端浏览的样式,然后对网页分割后的页面块进行类型识别,最后将识别后的页面块与对应的模块化样式相关联,进而完成页面转换。实验结果表明,本文方法仅需少量模板即可应对多种风格的页面,并解决了因分割造成的页面样式的丢失问题。
Aiming at the problem that the traditional template-based methods for webpage mobile adaptation cannot deal with too complex pages, this paper proposes a new hybrid matching method based on modular style templates. It first categorizes the page blocks that make up webpages, designs the styles suitable for browsing on the mobile terminal for each type of page blocks, then identifies the type of the page block after webpage segmentation, and finally associates the determined page blocks with the corresponding modular styles to complete the page conversion. Experimental results show that the presented method only needs a small number of templates to process different pages and solves the problem of page style loss caused by segmentation.
出处
《计算机科学与应用》
2020年第6期1234-1242,共9页
Computer Science and Application
关键词
移动端网页适配
样式模板
页面块分类
网页分割
Mobile Webpage Adaptation
Style Template
Page Block Classification
Webpage Segmentation