⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 030_css_margin.html

📁 学习时曾经用到的资料
💻 HTML
字号:
<html>
<head>
<title>CSS边距属性(margin)-CSS教程-网页教程与代码的中文站点-布啦布啦-blabla.cn</title>
<meta name="author" content="布啦布啦 www.blabla.cn">
<meta name="keywords" content="CSS中文教程,CSS教程,css代码,CSS属性,CSS边距属性,margin,margin-left,margin-right,margin-bottom, margin-top,,网页教程和代码的中文网站,网页制作,源代码,示例,布啦布拉,blabla.cn,examples">
<meta name="description" content="-网页教程与代码的中文站点-网页制作-布啦布啦-blabla.cn">
<meta name="generator" content="blabla buildsite v2.0 - C:\CodeBank\BLABLA\blablasource\webtutorials\200_css\030_css_margin.txt">
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../styles/bla01.css" type="text/css">

<script type="text/javascript">
function WsFvt() {
    window.external.addFavorite(
        "../default.htm", 
        "布啦布啦网页教程与代码[www.blabla.cn]");
}

function WsHome() {
    event.srcElement.style.behavior = "url(#default#homepage)";
    event.srcElement.setHomePage("../default.htm");
}

function WsActOn() {
    event.srcElement.className = "wsacton";
}

function WsAct() {
    event.srcElement.className = "wsact";
}

</script>
</head>
<body class=wsbody>

<div class=wsheader>
<table cellpadding=0 cellspacing=0 class=wslogoarea>
<td class=ws_a1><img src="../images/logo/blabla_logo01.gif" class=blablalogo03></td>
<td class=ws_a2>
<div>
<font class=wsact onmouseover="WsActOn()" onmouseout="WsAct()" onclick="WsFvt()">加入收藏</font> |
<font class=wsact onmouseover="WsActOn()" onmouseout="WsAct()" onclick="WsHome()">设为首页</font>|
<a href="mailto:webmaster@blabla.cn">联系我们</a>
</div>
<div style = "height:20px;"></div>
<div>
<a href="../html_tutorials/index.html">HTML教程</a> |
<a href="../html_tutorials/100_html_examples.html">HTML示例代码</a> |
<a href="index.html">CSS教程</a> |
<a href="100_CSS_examples.html">CSS示例代码</a> |
<a href="../js_tutorials/index.html">Javascript教程</a> |
<a href="../js_tutorials/100_js_examples.html">Javascript示例代码</a>
</div>
</td>
</tr></table>
</div>

<div class=wscontent>
<table cellpadding=0 cellspacing=0 class=wscgrid>
<td class=a1>
<div class=wsmenu><div class=box><div class=box>
<!--menupart Start  -->
<a href = "../index.html"><H1>网站首页</H1></a>
<a href = "../html_tutorials/index.html" ><H1>HTML网页教程与代码</H1></a><a href = "../html_tutorials/001_HTML_Overview.html" ><P>HTML基本概念</P></a><a href = "../html_tutorials/005_Basic_HTML_Tags.html" ><P>HTML基础Tag</P></a><a href = "../html_tutorials/010_Format_Tags.html" ><P>HTML常用格式</P></a><a href = "../html_tutorials/015_HTML_entities.html" ><P>HTML特殊字符</P></a><a href = "../html_tutorials/020_HTML_links.html" ><P>HTML超链接(Hyperlinks)</P></a><a href = "../html_tutorials/022_html_path.html" ><P>HTML相对和绝对路径</P></a><a href = "../html_tutorials/025_HTML_tables.html" ><P>HTML表格(Tables)</P></a><a href = "../html_tutorials/030_html_frame.html" ><P>HTML框架(Frames)</P></a><a href = "../html_tutorials/035_html_list.html" ><P>HTML列表(Lists)</P></a><a href = "../html_tutorials/037_html_form.html" ><P>HTML表单(Forms)</P></a><a href = "../html_tutorials/040_html_image.html" ><P>HTML图片(Images)</P></a><a href = "../html_tutorials/042_html_font.html" ><P>HTML字体(Fonts)</P></a><a href = "../html_tutorials/045_html_bgcolor_background.html" ><P>HTML背景颜色和图片</P></a><a href = "../html_tutorials/047_html_head.html" ><P>HTML头部信息(Head)</P></a><a href = "../html_tutorials/050_html_color_ref.html" ><P>HTML颜色参考(Color)</P></a><a href = "../html_tutorials/100_html_examples.html" ><P>HTML演示示例代码</P></a><a href = "../html_ref/index.html" ><H1>HTML参考(Reference)</H1></a><a href = "../html_tag_ref/index.html" ><P>HTML元素参考</P></a><a href = "../html_attr_ref/index.html" ><P>HTML属性参考</P></a><a href = "index.html" ><H1>CSS教程和代码</H1></a><a href = "001_CSS_Overview.html" ><P>CSS简介</P></a><a href = "005_CSS_Syntax.html" ><P>CSS语法</P></a><a href = "010_css_font.html" ><P>CSS常用字体属性(font)</P></a><a href = "015_css_text.html" ><P>CSS常用文本属性</P></a><a href = "020_CSS_background.html" ><P>CSS常用背景属性</P></a><a href = "025_css_border.html" ><P>CSS常用边框属性(border)</P></a><a href = "030_css_margin.html" ><P><B>CSS边距属性(margin)</B></P></a><a href = "035_css_padding.html" ><P>CSS间隙属性(padding)</P></a><a href = "040_css_diff_border_margin_padding.html" ><P>边框/边距/间隙的区别</P></a><a href = "045_css_list_style.html" ><P>CSS列表属性(list-style)</P></a><a href = "050_pseudo_class.html" ><P>CSS常用伪类(pseudo-class)</P></a><a href = "060_css_length_unit.html" ><P>CSS长度单位参考</P></a><a href = "100_CSS_examples.html" ><P>CSS演示示例代码</P></a><a href = "../js_tutorials/index.html" ><H1>Javascript教程和代码</H1></a><a href = "../js_tutorials/001_js_overview.html" ><P>Javascript简介</P></a><a href = "../js_tutorials/020_js_where2write.html" ><P>Javascript写在哪里</P></a><a href = "../js_tutorials/025_js_variables.html" ><P>Javascript变量(Variables)</P></a><a href = "../js_tutorials/090_js_reserved_words.html" ><P>Javascript保留字</P></a><a href = "../js_tutorials/100_js_examples.html" ><P>Javascript入门代码示例</P></a><a href = "../js_tutorials/101_js_dom_examples.html" ><P>Javascript DOM代码示例</P></a><a href = "../ref/index.html" ><H1>参考(Reference)</H1></a><a href = "../ref/ascii.html" ><P>ASCII编码表</P></a><a href = "../ref/iso_latin_1.html" ><P>ISO Latin-1字符集</P></a>
<!--menupart end  -->
</div></div></div>
</td>
<td class=a2><div class=wsarticle><div class=articlepart id = ap>
<div class=wstitle><div class=box><div class=box><h1>CSS边距属性</h1></div></div></div>
<!--articlepart start-->
<div class = changefont>
<span onclick= "ap.className='ArticlePartBig';"  class = bfont>大字体</span>
<span onclick= "ap.className='ArticlePart';"  class = sfont>小字体</span>
</div>
<P>边距属性是用来设置页面中一个元素所占空间的边缘到相邻元素之间的距离。</P><H2>左边距属性(margin-left)</H2><P>这个属性用来设定左边距的宽度。示例如下:</P><PRE>.d1{margin-left:1cm}</PRE><P><A href="../css_examples/027_css_margin_left.html">演示示例</A></P><H2>右边距属性(margin-right)</H2><P>这个属性用来设定右边距的宽度。示例如下:</P><PRE>.d1 {margin-right:1cm}</PRE><P>演示示例请参照左边距属性示例,只要将里面的margin-left改成margin-right即可。</P><H2>上边距属性(margin-top)</H2><P>这个属性用来设定上边距的宽度。示例如下:</P><PRE>.d1 {margin-top:1cm}</PRE><P>演示示例请参照左边距属性示例,只要将里面的margin-left改成margin-top即可。</P><H2>下边距属性(margin-bottom)</H2><P>这个属性用来设定下边距的宽度。示例如下:</P><PRE>.d1{margin-bottom:1cm}</PRE><P>演示示例请参照左边距属性示例,只要将里面的margin-left改成margin-bottom即可。</P><H2>边距属性(margin)</H2><P>这个属性是设定边距宽度的一个快捷的综合写法,用这个属性可以同时设定上下左右边距属性。</P><P>你可以为上下左右边距设置相同的宽度。示例入下:</P><PRE>.d1 {margin:1cm}</PRE><P>你也可以分别设置边距,顺序是上,右,下,左。示例如下:</P><PRE>.d1 {margin:1cm 2cm 3cm 4cm}</PRE><P>上面的代码表示,上边距为1cm,右边距为2cm,下边距为3cm,左边距为4cm。</P><P><A href="../css_examples/025_css_margin_same.html">演示示例:上下左右边距宽度相同</A></P><P><A href="../css_examples/026_css_margin_diff.html">演示示例:上下左右边距宽度各不相同</A></P>
<!--articlepart end-->

</div><div></td>
<td class=a3><div class=wslink>

<div class=wsportrait>
<img src="../images/logo/blabla_logo02.gif" class=blablalogo21>
</div>

<div class=wslgreen><div class=box><div class=box>
<h2>布啦布啦旗下网站</h2>
<p><a href="../index.html">布啦布啦网页教程与代码</a></p>
<p><a href="http://www.wowstory.com">小斧的魔兽世界</a></p>
<p><a href="../wow/index.html">小斧的魔兽世界镜像</a></p>
<p><a href="http://hardware.blabla.cn">数码资讯</a></p>
</div></div></div>


<div style= "background-color:#FFFFF0;
    border-top:3px solid #FFCC66; border-bottom:3px solid #FFCC66;border-left:1px solid #FFE0A1;border-right:1px solid #FFE0A1;">
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom" target="_top">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">

</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="blabla.cn"></input>
<input type="text" name="q" size="18" maxlength="255" value=""></input>
</td></tr>
<tr>
<td>&nbsp;</td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value=""></input>
<font size="-1" color="#000000" style = "font-size:12px;">Web</font>
</td>
<td>
<input type="radio" name="sitesearch" value="blabla.cn" checked="checked"></input>
<font size="-1" color="#000000"  style = "font-size:12px;">blabla.cn</font>
</td>
</tr>
</table>
<input type="submit" name="sa" value="Google 搜索"></input>
<input type="hidden" name="client" value="pub-3105632846497229"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="GB2312"></input>
<input type="hidden" name="oe" value="GB2312"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input>
<input type="hidden" name="hl" value="zh-CN"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->
</div>
<div style ="height:8px;font-size:8px;"></div>



<!--Google Adsense start-->
<div id="googlead" style = "width:160px; height:600px;" ></div>
<!--Google Adsense end-->

</div>
</td></tr>
</table></div>

<div class=wsfooter>
<table cellpadding=0 cellspacing=0 class=wsgrid>
<tr><td class=ws_a1>
<!--footer label start-->
&copy; 2005 blabla.cn版权所有 &nbsp;
<!--51yes statistics start-->
<script language="javascript" src="http://count1.51yes.com/click.aspx?id=13420718&logo=12"></script>
<!--51yes statistics end-->
</td></tr></table>
</div>


<!--Google Ad Script Start -->
<div id="googleadcode" style="display:none;">
<script type="text/javascript"><!--
google_ad_client = "pub-3105632846497229";
google_alternate_color = "FFFFFF";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "A8C8FF";
google_color_bg = "F5F9FF";
google_color_link = "0058DB";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

<script language="javascript">
if(document.all.item("googlead") != null)
{
  googlead.innerHTML = googleadcode.innerHTML;
}
</script>
<!--Google Ad Script End-->

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -