0
我对CSS很新。根据文件填充内容。 在这个例子中的内容是“Gifts and Special Offers” 在这个简单的例子中,我将padding-right设置为150px,这应该意味着根据文档我应该在内容右侧有150px的空间。但是在内容的右侧没有150px的空白空间。我在这里肯定错过了理解的东西?填充是填充内容,但这不完全正确
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Chapter 5: Indestructible Boxes</title>
<style type="text/css" media="screen">
h3
{
margin:50px;
padding:0px 150px 0px 0px;
border:1px solid black;
}
</style>
</head>
<body>
<div style="width:200px; background:red;">
<h3>Gifts and Special Offers</h3>
</div>
</body>
</html>
//托尼
+1只是改变了空格的顺序;) –