2
<style>
.wrapper {
position: relative;
z-index:1;
width: 100px;
background: yellow;
min-height: 70px;
}
.inner {
background: blue;
width: 100px;
min-height: 70px;
top: 0;
bottom: 0;
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div class="wrapper"></div>
<div class="inner"></div>
</body>
的wrapper
DIV重叠inner
股利。他们都创建堆叠上下文。然而,如果inner
股利有自己的定位创建的堆叠上下文我可以控制其堆叠上下文z-index
,但由于其堆叠上下文创建transform
如何使它重叠wrapper
股利?
正在从包装器样式选项中删除'z-index'? – raina77ow 2014-09-13 19:57:26
那么,这是探讨问题:)。我首先在那里添加它来模拟一种情况。 – 2014-09-13 20:10:31