+ -
当前位置:首页 → 问答吧 → code默认边距?

code默认边距?

时间:2010-09-06

来源:互联网

复制内容到剪贴板
代码:
<!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>demo</title>
<style type="text/css">
body {    margin:0; padding:0;}
.blockcode {
    position:relative;
    margin:10px 20px;
    width:700px;
    font-size:12px;
    font-family:宋体;
    background:#f2f3f7;
    border-color:#ccccd4;
    border-style:solid;
    border-width:4px 1px 1px;
    
}
.blockcode code {
    margin:1em 1em 1em 3em;
    font-size:14px;
    font-family:Courier New;
    line-height:1.6em;
}
</style>
</head>
<body>
<div class="blockcode">
    <code>wmode=&quot;transparent&quot;<br />
    wmode=&quot;transparent&quot;</code>
</div>
</body>
</html>
为什么这里margin:1em 1em 1em 3em;没起作用?

作者: skyzjg   发布时间: 2010-09-06

把CODE重置一下,看看有没有效果了

作者: atlantis2007   发布时间: 2010-09-06