The same is true for the child element that moves around an element into the positioning position along with it.
<!doctype html>
At the beginning, my logic was based on the four coordinates of the box. I didn't think of the four regions.
In addition, JavaScript only supports the mouseenter event in IE, but does not support both Google and Firefox. Because mouseover will bubble up, writing this effect will shake a bit. I tried it with native. It is best to use jquery to achieve this effect.
Effect: http://alisa.uehtml.com/
How can I determine to move the cursor over an element?
I want to create a mask. When you move the cursor over an element, the mask is displayed. however, this mask then requires you to write an onmousemove event Method on the mask layer. The method implementation principle is to obtain
Div parent element relative positioning child element absolute positioning Sun Tzu element how to do
1. the "Sun" child element inherits the child element.
2. Yes. However, you can place multiple child elements in a container.
First, you need to figure out the parent-child or sibling relationship of the container or element.
For example, if you set a bit for an element, all the content contained in this element follows this element, unless you locate the content.
After understanding this, your problem is actually a problem.