我給它居中了,為什么又不居中?總是出這樣的問題有時候text-align:center;總是沒效果
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>曲線陰影與翹邊陰影</title>
<style type="text/css">
body{font-size: 20px;font-family: Arial;}
body,ul{margin: 0;padding: 0;list-style: none;}
.wrap{
? ? width: 70%;
? ? height: 200px;
? ? margin: 50px auto;
? ? background: #fff;
}
.wrap h1{
? ? font-size: 20px;
? ? text-align: center;
? ? line-height: 200px;
}
</style>
</head>
<body>
<div ?id="wrap effect">
? ? <h1>shadow effect</h1>
</div>
</body>
</html>
2015-08-05
你CSS是以類的方式寫的,你代碼以ID的形式聲明的。
2015-08-05
你是想讓誰居中?這個效果應該是h1里面的內容居中。