| <?xml version="1.0" encoding="utf-8"?> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <title>Drag and drop of overlapping elements: negative margins</title> |
| <style type="text/css"> |
| div |
| {height:100px; |
| width:100px; |
| margin-top:-50px; |
| background-color:navy;} |
| div:nth-child(odd) |
| {background-color:maroon; |
| margin-left:50px;} |
| div[draggable] |
| {background-color:teal;} |
| </style> |
| </head> |
| <body> |
| <div/> |
| <div/> |
| <div draggable="true"/> |
| <div/> |
| <div/> |
| <div draggable="true"/> |
| <div/> |
| <div/> |
| <p>Only green areas should be draggable.</p> |
| </body> |
| </html> |