日期:2014-05-17  浏览次数:20826 次

opera下outline遮盖了顶层box怎么处理?
opera下outline遮盖了顶层box怎么处理?
求高手说说该怎么hack?



HTML code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>opera outline bug</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
    <style type="text/css">
        .box_1,.box_2{width:200px;height:200px;}
        .box_1{outline:1px solid red;overflow:hidden;}
        .box_2{
            position:absolute;
            background-color:tan;
            top:100px;
            left:100px;
        }
    </style>
    <div class="box_1">
        <h2>box_1</h2>
        <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
        <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
    </div>
    <div class="box_2">box_2 z-index:10</div>
</body>
</html>




------解决方案--------------------
.box_1{position:relative; z-index:1;}
.box_2{z-index:20;}