歌剧位置固定到固定元素并调整大小?

时间:2013-03-01 11:35:37

标签: css opera fixed

我使用了2个具有固定定位的div,并且在调整大小之后 - opera不会重绘元素。

#wrapper{
    position:fixed;
    z-index:10000;
    height: auto;
    background-color: transparent;
    margin: 0;
}

#label {
    position: fixed;
    bottom:0px;
    left: 50%;
    background-color: transparent;
    z-index: 9999999;
    height: 40px;
    width: 200px;
    border: 1px solid red;
    margin-left:-100px;
}


<div id="wrapper">
    <div id="label">content</div>
</div>

你可以在这里看到这个错误

http://jsfiddle.net/6Cm6J/1/

只需在Opera浏览器中加载页面并调整窗口大小。

请帮忙

1 个答案:

答案 0 :(得分:0)

写这个css

<强> Live Demo

<强> CSS

#wrapper{
    position:fixed;
    z-index:10000;
    height: auto;
    background-color: transparent;
    margin: 0;
    bottom:0;
    left:0;
    right:0;
}

#label {
    position: relative;
    bottom:0px;
    left: 50%;
    background-color: transparent;
    height: 40px;
    width: 200px;
    border: 1px solid red;
    margin-left:-100px;
}