L Button

Simulation of hover of non rectangular area.

by rulokc

HTML

<!-- L button -->
<div id="container">
    <div id="fig1">1</div>
    <div id="fig2">2</div>
    <div id="block"></div>
</div>
<!--
Could be convex buttons?
-->

CSS

#container {
    position: relative;
    width: 100px;
    height: 100px;
  }
  #fig1 {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: #0f0;
    font-size: 100px;
    line-height: 100px;
    text-align: center;
  }
  #fig2 {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: #f00;
    font-size: 100px;
    line-height: 100px;
    text-align: center;
  }
  #fig2:hover {
    opacity: 0.6;
  }
  #block {
    position: absolute;
    width: 50px;
    height: 50px;
    left: 50px;
    background-color: #fff;
  }