<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FoxLing - 前端开发 &#187; Margin</title>
	<atom:link href="http://foxling.org/tag/margin/feed/" rel="self" type="application/rss+xml" />
	<link>http://foxling.org</link>
	<description>我还在寻找方向</description>
	<lastBuildDate>Tue, 10 Apr 2012 16:48:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CSS Margin，边界重叠</title>
		<link>http://foxling.org/html-css-xml/css-margin-overlapping/</link>
		<comments>http://foxling.org/html-css-xml/css-margin-overlapping/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 15:39:39 +0000</pubDate>
		<dc:creator>FoxLing</dc:creator>
				<category><![CDATA[HTML/CSS/XML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Margin]]></category>
		<category><![CDATA[重叠]]></category>

		<guid isPermaLink="false">http://wp.foxling.cn/as-flex-air/54/</guid>
		<description><![CDATA[在标准浏览器里测试代码(FireFox,Opera,Safari&#8230;) &#60;div style="background-color:#ccc; height:100px; width:400px;"&#62; &#60;div style="margin-top:30px; background-color:#900; height:50px;"&#62;margin-top:30px; background-color:#900; height:50px;&#60;/div&#62; &#60;/div&#62; 你以为会是这样： 结果确是这样： 边界重叠是指两个或多个盒子(可能相邻也可能嵌套)的相邻边界(其间没有任何非空内容、补白、边框)重合在一起而形成一个单一边界。 常规流中两个或多个块级盒子的垂直相邻边界会重合。结果的边界宽度是相邻边界宽度中最大的值。如果出现负边界，则在最大的正边界中减去绝对值最大的负边界。如果没有正边界，则从零中减去绝对值最大的负边界。注意：相邻的盒子可能并非是由父子关系或同胞关系的元素生成。 但是边界的重叠也有例外情况： 水平边界永远不会重叠。 浮动盒子、绝对定位盒子、内联块盒子、根盒子的边界永不重叠。 overflow属性不等于visible的元素与它的非浮动子元素之间边界不发生重叠。 常规流中两个或多个块级盒子的垂直相邻边界会重合。结果的边界宽度是相邻边界宽度中最大的值。 如果出现负边界，则在最大的正边界中减去绝对值最大的负边界。]]></description>
			<content:encoded><![CDATA[<p>在标准浏览器里测试代码(FireFox,Opera,Safari&#8230;)</p>
<pre>
&lt;div style="background-color:#ccc; height:100px; width:400px;"&gt;
&lt;div style="margin-top:30px; background-color:#900; height:50px;"&gt;margin-top:30px; background-color:#900; height:50px;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>你以为会是这样：<br />
<img src="/attachments/month_0812/32008125152325.gif" alt="" /><br />
结果确是这样：<br />
<img alt="" src="/attachments/month_0812/62008125152352.gif" /></p>
<blockquote><p>
<strong>边界重叠</strong>是指两个或多个盒子(可能相邻也可能嵌套)的相邻边界(其间没有任何非空内容、补白、边框)重合在一起而形成一个单一边界。<br />
常规流中两个或多个块级盒子的垂直相邻边界会重合。结果的边界宽度是相邻边界宽度中最大的值。如果出现负边界，则在最大的正边界中减去绝对值最大的负边界。如果没有正边界，则从零中减去绝对值最大的负边界。注意：相邻的盒子可能并非是由父子关系或同胞关系的元素生成。<br />
但是边界的重叠也有例外情况：</p>
<ul>
<li>
    水平边界永远不会重叠。
    </li>
<li>
    浮动盒子、绝对定位盒子、内联块盒子、根盒子的边界永不重叠。
    </li>
<li>
    overflow属性不等于visible的元素与它的非浮动子元素之间边界不发生重叠。
    </li>
</ul>
</blockquote>
<p>常规流中两个或多个块级盒子的垂直相邻边界会重合。结果的边界宽度是相邻边界宽度中最大的值。<br />
<img src="/attachments/month_0812/52008125153351.gif" alt="" /><br />
如果出现负边界，则在最大的正边界中减去绝对值最大的负边界。<br />
<img src="/attachments/month_0812/b2008125153745.gif" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://foxling.org/html-css-xml/css-margin-overlapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

