<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>评论：小结line-height和vertical-align</title>
	<atom:link href="http://www.cssass.com/blog/index.php/2010/490.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cssass.com/blog/index.php/2010/490.html</link>
	<description>三人行必有我师焉，择其善者而从之，其不善者而改之</description>
	<lastBuildDate>Wed, 25 Jan 2012 04:26:31 +0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>来自：改变元素display属性的垂直居中方法。 &#124; CSSASS</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-502</link>
		<dc:creator>改变元素display属性的垂直居中方法。 &#124; CSSASS</dc:creator>
		<pubDate>Fri, 29 Oct 2010 02:32:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-502</guid>
		<description>[...] 下文与以上并无关系。 先说一些（未知尺寸元素）垂直居中的思路： 1. 我们一般会设置height=line-height来使一行内文字可以垂直居中，那能不能推而广之呢？遗憾，单纯设置外层height=line-height使image等可置换元素垂直居中，在ie6下是行不通的。见小结line-height和vertical-align, image等可置换元素尚且不行，更别提div等块级元素了。 2. 利用display的一个属性：table-cell。其实这个方法用来支持垂直居中，那是舍我其谁啊，可以ie8以下的浏览器并不支持display:table-cell; 我们可以看一下： [...]</description>
		<content:encoded><![CDATA[<p>[...] 下文与以上并无关系。 先说一些（未知尺寸元素）垂直居中的思路： 1. 我们一般会设置height=line-height来使一行内文字可以垂直居中，那能不能推而广之呢？遗憾，单纯设置外层height=line-height使image等可置换元素垂直居中，在ie6下是行不通的。见小结line-height和vertical-align, image等可置换元素尚且不行，更别提div等块级元素了。 2. 利用display的一个属性：table-cell。其实这个方法用来支持垂直居中，那是舍我其谁啊，可以ie8以下的浏览器并不支持display:table-cell; 我们可以看一下： [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：gfgfgd</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-248</link>
		<dc:creator>gfgfgd</dc:creator>
		<pubDate>Sat, 20 Mar 2010 08:15:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-248</guid>
		<description>):9:(</description>
		<content:encoded><![CDATA[<p> <img src='http://www.cssass.com/blog/wp-includes/images/smilies/17.gif' alt='):9:(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：ONEBOYS</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-198</link>
		<dc:creator>ONEBOYS</dc:creator>
		<pubDate>Sat, 30 Jan 2010 05:31:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-198</guid>
		<description>确实，thank you。那就省事多了</description>
		<content:encoded><![CDATA[<p>确实，thank you。那就省事多了</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：shadow</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-186</link>
		<dc:creator>shadow</dc:creator>
		<pubDate>Fri, 15 Jan 2010 06:08:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-186</guid>
		<description>对于.pillar在Opera的问题 应该不是不能设置width:0;你将放在最后面试试。</description>
		<content:encoded><![CDATA[<p>对于.pillar在Opera的问题 应该不是不能设置width:0;你将放在最后面试试。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：周大智</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-184</link>
		<dc:creator>周大智</dc:creator>
		<pubDate>Thu, 14 Jan 2010 13:37:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-184</guid>
		<description>&lt;a href=&quot;#comment-183&quot; rel=&quot;nofollow&quot;&gt;@oneboys&lt;/a&gt;, 关于non-replaced elements在一行下居中，我应该是理解错了你的意思。在IE6下，我只测试了img，input[type=&quot;text&quot;]，input[type=&quot;checkbox&quot;]。看来结论下的太早，感谢你的提醒。</description>
		<content:encoded><![CDATA[<p><a href="#comment-183" rel="nofollow">@oneboys</a>, 关于non-replaced elements在一行下居中，我应该是理解错了你的意思。在IE6下，我只测试了img，input[type="text"]，input[type="checkbox"]。看来结论下的太早，感谢你的提醒。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：oneboys</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-183</link>
		<dc:creator>oneboys</dc:creator>
		<pubDate>Thu, 14 Jan 2010 12:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-183</guid>
		<description>&lt;a href=&quot;#comment-181&quot; rel=&quot;nofollow&quot;&gt;@周大智&lt;/a&gt;, 全是non-replaced element的行的确可以啊，这点我没有否认的。另外，我再测试了其他几个replaced element元素，label,button的确有特殊，应该是因为带了textNode节点的缘故，所以在ie6下也能显示出line-height的作用。看来，这个和我第二个例子（下半个）提到的那样，也另当别论了。</description>
		<content:encoded><![CDATA[<p><a href="#comment-181" rel="nofollow">@周大智</a>, 全是non-replaced element的行的确可以啊，这点我没有否认的。另外，我再测试了其他几个replaced element元素，label,button的确有特殊，应该是因为带了textNode节点的缘故，所以在ie6下也能显示出line-height的作用。看来，这个和我第二个例子（下半个）提到的那样，也另当别论了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：oneboys</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-182</link>
		<dc:creator>oneboys</dc:creator>
		<pubDate>Thu, 14 Jan 2010 11:34:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-182</guid>
		<description>&lt;a href=&quot;#comment-181&quot; rel=&quot;nofollow&quot;&gt;@周大智&lt;/a&gt;, 嗯，的确笔误写错了，多谢提醒。你说的第二点，可能是我表述不好，我是意思是，“在上面的例子里，除了ie6，其他都显示出了line-height的作用”。编辑一下，再次感谢。</description>
		<content:encoded><![CDATA[<p><a href="#comment-181" rel="nofollow">@周大智</a>, 嗯，的确笔误写错了，多谢提醒。你说的第二点，可能是我表述不好，我是意思是，“在上面的例子里，除了ie6，其他都显示出了line-height的作用”。编辑一下，再次感谢。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：周大智</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-181</link>
		<dc:creator>周大智</dc:creator>
		<pubDate>Thu, 14 Jan 2010 08:36:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-181</guid>
		<description>“单纯设置外层height=line-height使image等非可置换元素垂直居中，在ie6下是行不通的。”，这句话应该是笔误了吧。image是replaced element。
还有“除了ie6，line-height在其他浏览器都能起作用。”这个说法不是太认同，ie6下面是有点BUG，所以有replaced element的行不能居中对齐，但是全是non-replaced element元素的行还是可以的。

水平有限，如有得罪，还请原谅。</description>
		<content:encoded><![CDATA[<p>“单纯设置外层height=line-height使image等非可置换元素垂直居中，在ie6下是行不通的。”，这句话应该是笔误了吧。image是replaced element。<br />
还有“除了ie6，line-height在其他浏览器都能起作用。”这个说法不是太认同，ie6下面是有点BUG，所以有replaced element的行不能居中对齐，但是全是non-replaced element元素的行还是可以的。</p>
<p>水平有限，如有得罪，还请原谅。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：oneboys</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-174</link>
		<dc:creator>oneboys</dc:creator>
		<pubDate>Fri, 08 Jan 2010 05:14:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-174</guid>
		<description>&lt;a href=&quot;#comment-173&quot; rel=&quot;nofollow&quot;&gt;@dylan&lt;/a&gt;, HTML（小说明：我说的是html标准，而不是xhtml，他们在一些概念上还是有差别的。）里分两种基本元素，即block和inline。顾名思义，block元素就是以&quot;块&quot;表现的元素（block-like elements），inline元素即是以&quot;行&quot;表现的元素（character level elements and text strings）。二者表现的主要差别在于，在页面文档中block元素另起一行开始，并独占一行。inline元素则同其他inline元素共处一行。

block元素大致有：P&#124;H1&#124;H2&#124;H3&#124;H4&#124;H5&#124;H6&#124;UL&#124;OL&#124;PRE&#124; DL &#124; DIV &#124; NOSCRIPT &#124; BLOCKQUOTE &#124; FORM &#124; HR &#124; TABLE &#124; FIELDSET &#124; ADDRESS(随着html5标准的推进，一些元素将被废除，而一些新的元素将被引入)
注意的是并非所有的block元素的默认display属性都是block，像table这种display:table的元素也是block元素。

inline元素大致有：#PCDATA（即文本）&#124; TT &#124; I &#124; B &#124; BIG &#124; SMALL&#124;EM &#124; STRONG &#124; DFN &#124; CODE &#124;SAMP &#124; KBD &#124; VAR &#124; CITE &#124; ABBR &#124; ACRONYM&#124;A &#124; IMG &#124; OBJECT &#124; BR &#124; SCRIPT &#124; MAP &#124; Q &#124; SUB &#124; SUP &#124; SPAN &#124; BDO&#124;INPUT &#124; SELECT &#124; TEXTAREA &#124; LABEL &#124; BUTTON
其中有类特殊的元素：如img&#124;input&#124;select&#124;textarea&#124;button&#124;label等，他们被称为可置换元素（Replaced element）。他们区别一般inline元素（相对而言，称non-replaced element）是：这些元素拥有内在尺寸(intrinsic dimensions),他们可以设置width/height属性。他们的性质同设置了display:inline-block的元素一致。</description>
		<content:encoded><![CDATA[<p><a href="#comment-173" rel="nofollow">@dylan</a>, HTML（小说明：我说的是html标准，而不是xhtml，他们在一些概念上还是有差别的。）里分两种基本元素，即block和inline。顾名思义，block元素就是以&#8221;块&#8221;表现的元素（block-like elements），inline元素即是以&#8221;行&#8221;表现的元素（character level elements and text strings）。二者表现的主要差别在于，在页面文档中block元素另起一行开始，并独占一行。inline元素则同其他inline元素共处一行。</p>
<p>block元素大致有：P|H1|H2|H3|H4|H5|H6|UL|OL|PRE| DL | DIV | NOSCRIPT | BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS(随着html5标准的推进，一些元素将被废除，而一些新的元素将被引入)<br />
注意的是并非所有的block元素的默认display属性都是block，像table这种display:table的元素也是block元素。</p>
<p>inline元素大致有：#PCDATA（即文本）| TT | I | B | BIG | SMALL|EM | STRONG | DFN | CODE |SAMP | KBD | VAR | CITE | ABBR | ACRONYM|A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO|INPUT | SELECT | TEXTAREA | LABEL | BUTTON<br />
其中有类特殊的元素：如img|input|select|textarea|button|label等，他们被称为可置换元素（Replaced element）。他们区别一般inline元素（相对而言，称non-replaced element）是：这些元素拥有内在尺寸(intrinsic dimensions),他们可以设置width/height属性。他们的性质同设置了display:inline-block的元素一致。</p>
]]></content:encoded>
	</item>
	<item>
		<title>来自：dylan</title>
		<link>http://www.cssass.com/blog/index.php/2010/490.html/comment-page-1#comment-173</link>
		<dc:creator>dylan</dc:creator>
		<pubDate>Thu, 07 Jan 2010 08:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.cssass.com/blog/?p=490#comment-173</guid>
		<description>你好！！我想请教几个问题:能发到我邮箱上吗?谢谢
问题是:在html标签中那些是块元素，哪些是inline元素,和哪些是非可置换inline元素,和不可置换inline元素...我刚学CSS..</description>
		<content:encoded><![CDATA[<p>你好！！我想请教几个问题:能发到我邮箱上吗?谢谢<br />
问题是:在html标签中那些是块元素，哪些是inline元素,和哪些是非可置换inline元素,和不可置换inline元素&#8230;我刚学CSS..</p>
]]></content:encoded>
	</item>
</channel>
</rss>

