为什么这样写定宽块状元素就不会居中显示了,而把left去掉就可以居中了
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>定宽块状元素水平居中</title>
<style>
div{
border:1px solid red;
width:200px;
margin-left:auto;
}
</style>
</head>
<body>
<div>我是定宽块状元素,我要水平居中显示。</div>
</body>
</html>