Home > Web Front-end > JS Tutorial > Implementation code for the arrangement of irregular rectangles based on jquery_jquery

Implementation code for the arrangement of irregular rectangles based on jquery_jquery

WBOY
Release: 2016-05-16 17:54:15
Original
1400 people have browsed it

This thing reminds me of Tetris. It is very simple to implement. All the block elements in the container are arranged with absolute positioning. If they can fit, put them here. If they cannot fit, find the ones that can fit in the queue. Element placement, if
cannot be found, then wrap it to the next line. The specific idea is this. There are detailed comments in the code, so just look at the code.
The following is a demo:
http://demo.jb51.net/js/2012/sortRect/
Code package downloadsortRect.rar

Copy code The code is as follows:





不规则宽高排列

















































































































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