Home > Web Front-end > JS Tutorial > Solution to the overlap between elements automatically generated by js and the original elements of the page_javascript skills

Solution to the overlap between elements automatically generated by js and the original elements of the page_javascript skills

WBOY
Release: 2016-05-16 16:37:22
Original
1107 people have browsed it

Product attributes and product specifications are elements dynamically generated by js. The two text boxes for product extension information are original elements. They overlap. I thought it was because the size of the div where the elements I generated was not fixed, because the product The checkbox below the specification is generated by the second ajax. I wonder if the second ajax cannot push the original elements of the page down to the appropriate position.

After working on it for several hours, I tried to fix the size of the container div where the elements are located, but it was not easy to fix. The number of elements was variable. I tried to change the order in which attributes and specifications were generated. The attributes part was piled up on the specifications part. , why do the elements in the specifications section not occupy independent positions? Later, I thought about whether they were floating. I removed the floating and added clear:both; to the original elements (product extension information section), and it turned out normal.

Don’t panic when you encounter problems, don’t be afraid of trouble, and deal with them slowly.

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