0

I'm attempting a CSS layout of three divs stacked vertically. The top and bottom divs are slanted. The body is horizontal and meant to fluctuate in size with the content that loads. I've been able to get this working in all modern browsers except IE 9. I've attempted to overlap the divs to cover the grey line. That works, but since I'm working with opacity, the divs darken where they overlap and that's just as bad. Would appreciate any help.

The line: enter image description here

Sample Code:

<!DOCTYPE html>
<html>
<head>
<style>
div{
width: 200px;
left: 300px;  
height: 200px;
position: relative;
background-color: rgba( 0, 26, 159, 0.7)
}
#top{
transform: skew(8deg, 0deg);
-ms-transform: skew(-8deg, 0deg);
left: 314px;
}
#bottom{
transform: skew(8deg, 0deg);
-ms-transform: skew(-8deg, 0deg);
left: 286px;
}
#middle{
height: auto;
}
</style>
</head>
<body>
<div id="top"></div>
<div id="middle">
Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test  text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />
Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />Test text<br />T
</div>
<div id="bottom"></div>
</body>
</html>
4

1 回答 1

0

由于 IE9 可以处理透明图像,我们生成了具有所需不透明度的图像并使用它来代替 CSS3。

于 2013-04-01T23:20:51.317 回答