【发布时间】:2011-03-27 07:04:34
【问题描述】:
这是位于网页上的两个跨度(在现实生活中有很多跨度)。我想设置它们之间的距离。我想为此使用 margin-bottom 属性,但我看不到使用它的任何影响。跨度仍然在之前的位置。那是错的。 这是我的代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<style type="text/css">
.position, .name{
overflow: hidden;
}
.position{
margin-bottom: 40px;
}
</style>
</head>
<body>
<span class="position">Designer</span><br/>
<span class="name">John Smith</span>
</body>
</html>
【问题讨论】:
标签: css xhtml layout margin html