Any way to do slanted/diagonal mouseovers via css/javascript?

Posted by cksubs on Stack Overflow See other posts from Stack Overflow or by cksubs
Published on 2010-04-18T07:06:41Z Indexed on 2010/04/18 7:13 UTC
Read the original article Hit count: 341

Filed under:
|
|
|

Hi, I have a box built via html borders.

I want to connect the bottom left corner to the top right corner with a diagonal line. Either with html/css or by using a background image, doesn't matter. I'll figure that part out later.

------
-   /-
-  / -
- /  -
-/----

Here's the tricky part: I want a different thing to happen depending on which side of the line the mouse is hovering over. I'll do something like make some text visible or change the background color.

Is that possible in web programing? I've thought of doing a "Riemann sum" type calculation with a bunch of invisible divs. Any easier way?

Thanks!

© Stack Overflow or respective owner

Related posts about web-development

Related posts about css