<分区>
我有一个面板,我将面板的主体居中。它在除 IE 之外的所有浏览器中都运行良好...谁能告诉我为什么?
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
CSS
.chart-center {
text-align: -moz-center; /*firefox*/
text-align: -webkit-center; /*safari, chrome*/
margin: 0 auto;
}
HTML
<div class="col-lg-4">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title text-center"><i class="fa fa-usd fa-fw"></i> My Chart</h3>
</div>
<div class="panel-body text-center chart-center">
<div id="myID"></div>
</div>
</div>
</div>
最佳答案
使用默认的:
.chart-center {
text-align: center; /*default*/
margin: 0 auto;
}
实际上,对于此属性,供应商前缀是不必要的。
关于html - 文本对齐中心在 IE 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31679962/