Implement a function: Move the mouse to the left of a picture to show the left arrow, move to the right to display the right arrow.
Implementation method: An IMG Above the style of positioning two div,div as follows:
?
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
.toleft { width: 200px; height: 300px; position: absolute; left: 0px; top: 0px; cursor: url(../images/test/cursor_left.cur), default; } .toright { width: 200px; height: 300px; position: absolute; left: 200px; top: 0px; cursor: url(../images/test/cursor_right.cur), default; } |
Other browsers are OK, but IE is not inside.
Later, several methods were tried:
1. Add Z-idnex:1 to the IMG, add z-index:2 to div///No
2. Remove the Position:absolute of Div and add float:left; No way
Helpless, later to Div added a background-color: #fff; Hey, you can do it.
Finally, the div's transparency is set to 0 OK.