<?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>ilMilk.com &#187; IE</title>
	<atom:link href="http://www.ilmilk.com/tag/ie/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ilmilk.com</link>
	<description>i LoVe Milk-ilMilk&#039;s Blog</description>
	<lastBuildDate>Thu, 21 Apr 2011 05:46:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>利用CSS等比例缩小图片</title>
		<link>http://www.ilmilk.com/scaled-down-image-using-css.html</link>
		<comments>http://www.ilmilk.com/scaled-down-image-using-css.html#comments</comments>
		<pubDate>Fri, 04 Jun 2010 23:41:41 +0000</pubDate>
		<dc:creator>ilmilk</dc:creator>
				<category><![CDATA[CSS之美]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[等比例缩小]]></category>

		<guid isPermaLink="false">http://www.ilmilk.com/?p=216</guid>
		<description><![CDATA[图片等比缩放不必需要后台代码的控制，前台CSS技术完全可以几句CSS代码来完成。 把一副大图片按比例缩小到某个尺寸，对于现代浏览器，直接使用max-width和max-height两条CSS属性即可。     对于IE 6.0及以下版本，以上两条CSS属性均不会被理会。之前处理这种事情，我们往往会借助Javascript，然后为图片加上onload事件。例如：     这固然能解决问题，但是对以后页面的升级会带来麻烦——随着浏览器对CSS支持的完善，我们迟早会把图片上的onload事件统统去除。该是Expression的Show Time了，既然IE支持通过Expression在CSS中放置一些脚本，而这段脚本又只是提供给IE 6.0及以下版本使用，那么把它写到Expression中再合适不过。     最终，把一副大图片按比例缩小到50px*50px以内，可以参照以下这段CSS：  .thumbImage{ max-width:50px; max-height:50px; } *html.thumbImage{ width:expression(this.width&#62;50&#38;&#38;this.width&#62;this.height?50:auto); height:expression(thhis.height&#62;50?50:auto); } 需要了解的DIVCSS面试题目 雅虎面试题-你真的了解HTML吗? 大型网站css样式命名和应用原则


<ol><li><a href='http://www.ilmilk.com/need-to-know-divcss-interview-questions.html' rel='bookmark' title='Permanent Link: 需要了解的DIVCSS面试题目'>需要了解的DIVCSS面试题目</a></li>
<li><a href='http://www.ilmilk.com/know-html.html' rel='bookmark' title='Permanent Link: 雅虎面试题-你真的了解HTML吗?'>雅虎面试题-你真的了解HTML吗?</a></li>
<li><a href='http://www.ilmilk.com/large-sites-and-application-of-the-principles-of-css-style-name.html' rel='bookmark' title='Permanent Link: 大型网站css样式命名和应用原则'>大型网站css样式命名和应用原则</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>图片等比缩放不必需要后台代码的控制，前台CSS技术完全可以几句CSS代码来完成。</p>
<p>把一副大图片按比例缩小到某个尺寸，对于现代浏览器，直接使用max-width和max-height两条CSS属性即可。</p>
<p>    对于IE 6.0及以下版本，以上两条CSS属性均不会被理会。之前处理这种事情，我们往往会借助Javascript，然后为图片加上onload事件。例如：</p>
<p>    这固然能解决问题，但是对以后页面的升级会带来麻烦——随着浏览器对CSS支持的完善，我们迟早会把图片上的onload事件统统去除。该是Expression的Show Time了，既然IE支持通过Expression在CSS中放置一些脚本，而这段脚本又只是提供给IE 6.0及以下版本使用，那么把它写到Expression中再合适不过。<span id="more-216"></span></p>
<p>    最终，把一副大图片按比例缩小到50px*50px以内，可以参照以下这段CSS：</p>
<blockquote><p> .thumbImage{</p>
<p>max-width:50px;</p>
<p>max-height:50px;</p>
<p>}</p>
<p>*html.thumbImage{</p>
<p>width:expression(this.width&gt;50&amp;&amp;this.width&gt;this.height?50:auto);</p>
<p>height:expression(thhis.height&gt;50?50:auto);</p>
<p>}</p></blockquote>


<p><ol><li><a href='http://www.ilmilk.com/need-to-know-divcss-interview-questions.html' rel='bookmark' title='Permanent Link: 需要了解的DIVCSS面试题目'>需要了解的DIVCSS面试题目</a></li>
<li><a href='http://www.ilmilk.com/know-html.html' rel='bookmark' title='Permanent Link: 雅虎面试题-你真的了解HTML吗?'>雅虎面试题-你真的了解HTML吗?</a></li>
<li><a href='http://www.ilmilk.com/large-sites-and-application-of-the-principles-of-css-style-name.html' rel='bookmark' title='Permanent Link: 大型网站css样式命名和应用原则'>大型网站css样式命名和应用原则</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.ilmilk.com/scaled-down-image-using-css.html/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

