0

次の例でChrome25.0またはFirefox18のボタンのクリックがサポートされていない理由を理解しようとしています。IE9/10で機能します。

とても基本的なものが欠けているような気がします。Z-インデックス?

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style>
        html, body {
            height: 100%;
            margin: 0px;
            overflow: hidden;
            width: 100%;
        }

        .top {
            height: 100%;
            width: 100%;
            overflow: hidden;
            background: gold;
            text-align: center;
            vertical-align: middle;
            z-index: 1;
        }
        .left {
            float: left;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            width: 80%;
        }

        .right {
            float: right;
            height: 100%;
            position: absolute;
            right: 0;
            top: 0;
        }
    </style>
</head>
<body>
    <div class="top">
        <button id="btn" onclick="alert('hello')">Click Me!</button>
    </div>
    <div class="left">
        left
    </div>
    <div class="right">
        right
    </div>
</body>
</html>
4

1 に答える 1