我目前正在从事 css3/html5 元素。由于我之前提出的一个问题,它在 chrome 中运行完美,并且建议使用 flexie ( http://flexiejs.com/ ) 的答案,但在 IE 中甚至不接近。下面是它在 Chrome 中的样子。
在 IE 中它看起来像下面这样
我已将代码添加到 http://jsfiddle.net/Ax6Xr/如果有帮助。
我已经添加了下面的 CSS,因为出于某种原因 stackoverflow 不允许我在不发布一些代码的情况下提交,这些代码看起来有点毫无意义,因为我已经链接到 jsfiddle。
html, body
{
padding: 0;
margin: 0;
height: 100%;
}
#wrapper
{
display: -webkit-box;
-webkit-box-orient: vertical;
min-height: 100%;
background-color: purple;
width: 100%;
margin-top: 0px;
}
header
{
width: 100%;
height: 80px;
background-color: black;
color: white;
}
#articleContainer {
width: 75%;
margin: auto;
background-color: blue;
display: -webkit-box;
-webkit-box-flex: 1;
}
#articleContent
{
width: 70%;
background-color: yellow;
}
#articleSideBar
{
position: relative;
width: 28%;
background-color: green;
margin-left: 2px;
margin-right: 2px;
display: inline;
margin-top: 0px;
height: auto;
}
下面是HTML
<html>
<head>
<title>index</title>
<link href="ArticleStyleSheet.css" rel="stylesheet" type="text/css" />
<script src="../scripts/flexie.js" type="text/javascript"></script>
</head>
<body>
<div id="wrapper">
<header>
Header
</header>
<div id="articleContainer">
<div id="articleContent" contenteditable>
The quick brown fox jumped over the lazy dogs back. All good men must come to the aid of the party
</div>
<div id="articleSidebar">
Article Sidebar
</div>
</div>
</div>
</body>
</html>
最佳答案
IE 还不兼容 HTML5。我相信 IE10 会。
关于html - 使用 flexie 在与 IE 兼容的容器中并排划分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12980725/