Even if the world is the father, there are always some attributes that will take you out of despair (great Absolute)
Spit It out today! ...... There is no Orthodox UI in my world, so it will always be such a pit daddy!
Here I would like to thank for having a position:absolute; t_t
When it comes to a variety of unreasonable layouts, at least it
Spit Groove finished!!!
This is a simple image capture tool!! It's a little rough, I admit.
First step, no big problem, parse picture format
The picture is nothing more than png,jpg,gif all the extra alert boxes to tell them to change
The second step, it's nothing weird. Difficulty, just set the mouse shape
The third step is still no difficulty. Get the position of the mouse to press down Event.clientx,event.clienty, release the position Event.clientx,event.clienty
The fourth step is still not difficult!
It's just a 4-block position with absolute positioning.
Add a gray transparent
Sixth step or no difficulty, altogether so 6 points the mouse presses down the trigger function, then releases remembers the position adjusts the image
The 7th side of the thumbnail, nothing else is to adjust the image size and position (margin what can) anyway, the most outside wrapped with an avatar width and height, the extra over-flow:hidden is good
8th upload image, Ajax return to processed pictures
JS capture image upload (principle only)----idle boring code will not be shared! Bad writing, sorry to show you (embarrassed)