Webpage CSS structure automatic generation method and storage medium
A technology for automatic generation and web pages, applied in WEB pages and the Internet field, to achieve the effects of easy maintenance, clear CSS structure, and wide application range
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0063] Such as image 3 As shown, the method for automatically generating a webpage CSS structure in this embodiment may include the following steps:
[0064] Step 1: Open a webpage in the browser, create a container element in the webpage, and set the unique identification (id) of the container, such as "main", the sample code is as follows:
[0065]
[0066] Step 2: Obtain the HTML code of the CSS organization structure to be generated, such as a parent div element whose style name (class) is page, and there are three div elements whose style names (classes) are header banner, content, and footer respectively, and the style name There is an h1 element whose style name (class) is page-title under the child div element (class) of header banner. The corresponding sample code is as follows:
[0067]
[0068] Step 3: assign the HTML code obtained in step 2 to the innerHTML attribute of the container element, this step will generate a child DOM tree with the container eleme...
Embodiment 2
[0087] Many WEB systems have implemented permission control and require users to log in before using it. Therefore, the login page is indispensable in many systems as an entry. In this scenario, usually on the login page, the user needs to enter the user name, password, verification code, etc. In order to make the page more beautiful, you need to use the corresponding CSS to control the style of the page elements. In addition, there are input box titles, input prompts, error prompts, success prompts, etc. need to write corresponding CSS.
[0088] Using the method for automatically generating webpage CSS structure of the present invention, a DOM tree can be generated according to a given HTML structure, and then the DOM tree can be traversed through JavaScript to obtain the hierarchical relationship and sequence of each node, and then a CSS structure corresponding to the hierarchy and sequence can be generated. It roughly includes the following steps:
[0089] Step A: Obtain t...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com