<?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>Acroidea &#187; HTML</title>
	<atom:link href="http://www.acroidea.com/index.php/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acroidea.com</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 09:31:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Background Images and CSS in HTML Email</title>
		<link>http://www.acroidea.com/index.php/2009/05/28/background-images-and-css-in-html-email/</link>
		<comments>http://www.acroidea.com/index.php/2009/05/28/background-images-and-css-in-html-email/#comments</comments>
		<pubDate>Thu, 28 May 2009 04:33:56 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.acroidea.com/?p=180</guid>
		<description><![CDATA[http://www.mailchimp.com/blog/background-images-and-css-in-html-email/ We’ve noticed a few people having issues with background images in their HTML email designs, so we thought we’d...]]></description>
			<content:encoded><![CDATA[<p>http://www.mailchimp.com/blog/background-images-and-css-in-html-email/</p>
<p>We’ve noticed a few people having issues with background images in their HTML email designs, so we thought we’d post some quick tips here.</p>
<p>Lots of email applications (especially the browser-based ones, like Yahoo!Mail, Hotmail and Gmail) strip out your <html>, <head> and <body> tags. It kinda makes sense, if you think about it. They’re displaying your email inside their web page. They don’t want your page settings (like background colors, files, CSS, etc) to interfere with their overall interface. So they strip it all out.</p>
<p>That means you’ll kinda have to rig your HTML email to make certain things work…</p>
<p>Background Images and colors in HTML Email</p>
<p>If you want to set a background image or color in your HTML email, you can set it in your BODY tag, where it usually goes. That’ll work ok for some desktop email applications, like Microsoft Outlook.</p>
<p>But to make it work across more email applications, you need to “rig” your code so that your entire email is set inside a big TABLE WRAP. Just set a big table that’s 100% wide, then specify your background color and image there. We recommend doing it the old-fashioned “bgcolor” or “background=”&#8221; way. If you prefer doing it with CSS, be sure to read the “CSS” tips below. As with all images in HTML email, they need to be hosted on your server, and you need to point to them with absolute (not relative) paths.</p>
<p>Once you’ve created the big TABLE WRAP with your background color or image, place your actual newsletter code inside, and you’re good to go.</p>
<p>If you’re a very experienced web designer, this will no doubt make you feel dirty, and make you want to take a shower immediately afterwards. But HTML email isn’t as reliable as web pages are (yet) and there are way too many email apps out there that display HTML differently. Until all the various email apps get a little more consistent, you’re going to have to get used to “rigs” like this.<br />
CSS in HTML Email</p>
<p>There are all sorts of “CSS tips and tricks for HTML email.” But the main thing to remember is that the <head> and <body> tags get stripped when HTML email is displayed in browser based applications. So that means you can’t link to an external CSS file from the <head> portion of your email. You’ll need to use embedded or inline CSS in HTML email instead. And, if you take the embedded approach, be sure to place all your code BELOW the <body> tag. Place it just above your content. Feels dirty, I know. But it’s the only way to get CSS to work (reliably) in email.</p>
<p>Periods = “Stop Email!”<br />
If you start any line in your email with a “period,” some email servers interpret that as “end of message” and they’ll stop it right there. D’oh! So this affects how you need to code your CSS. When you embed your CSS, be careful with the little “dots” or “periods” that are used to define styles. If you start your line of CSS with “.header” for instance, that’s exactly where some email servers will cut your message off. So in your CSS, add a space before every single line that starts with a period.</p>
<p>It’s not just a CSS thing. It’s any line that starts with a period (see our previous post). But the CSS portion of your email is more likely to have lines that start with periods, so it’s good to mention it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acroidea.com/index.php/2009/05/28/background-images-and-css-in-html-email/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HTML版本引起的object标签显示问题</title>
		<link>http://www.acroidea.com/index.php/2009/04/06/html-version-object/</link>
		<comments>http://www.acroidea.com/index.php/2009/04/06/html-version-object/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 13:31:29 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[SWF]]></category>

		<guid isPermaLink="false">http://www.acroidea.com/?p=169</guid>
		<description><![CDATA[CSS部分： body { margin: 0px; padding: 0px; } object { margin: 0px; padding: 0px; } table, tr, td { padding:...]]></description>
			<content:encoded><![CDATA[<p>CSS部分：</p>
<p>body<br />
{<br />
margin: 0px;<br />
padding: 0px;<br />
}<br />
object<br />
{<br />
margin: 0px;<br />
padding: 0px;<br />
}<br />
table, tr, td<br />
{<br />
padding: 0px;<br />
margin: 0px;<br />
border: 0px;<br />
}<br />
iframe<br />
{<br />
margin: 0px;<br />
padding: 0px;<br />
}<br />
#body.day<br />
{<br />
background: #F0FF00;<br />
}<br />
#body.night<br />
{<br />
background: #000000 url(&#8220;images/night_Scene_body.jpg&#8221;) repeat;<br />
}</p>
<p>BODY的内容：</p>
<p>&lt;table style=&#8221;background-color: Black;&#8221; border=&#8221;0&#8243; cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243;<br />
width=&#8221;100%&#8221;&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;<br />
&lt;object style=&#8221;visibility: visible;&#8221; id=&#8221;bg_left&#8221; data=&#8221;night_WhoScene_bg_side.swf&#8221;<br />
type=&#8221;application/x-shockwave-flash&#8221; height=&#8221;600&#8243; width=&#8221;100&#8243;&gt;<br />
&lt;param value=&#8221;exactfit&#8221; name=&#8221;scale&#8221;/&gt;<br />
&lt;param value=&#8221;window&#8221; name=&#8221;wmode&#8221;/&gt;<br />
&lt;param value=&#8221;false&#8221; name=&#8221;allowfullscreen&#8221;/&gt;<br />
&lt;/object&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;&lt;div&gt;<br />
&lt;object style=&#8221;visibility: visible;&#8221; id=&#8221;bg_bottom&#8221; data=&#8221;night_WhoScene_bg_bottom.swf&#8221;<br />
type=&#8221;application/x-shockwave-flash&#8221; height=&#8221;40&#8243; width=&#8221;1280&#8243;&gt;<br />
&lt;param value=&#8221;exactfit&#8221; name=&#8221;scale&#8221;/&gt;<br />
&lt;param value=&#8221;window&#8221; name=&#8221;wmode&#8221;/&gt;<br />
&lt;param value=&#8221;false&#8221; name=&#8221;allowfullscreen&#8221;/&gt;<br />
&lt;/object&gt;&lt;/div&gt;</p>
<p>对于IE7，显示时上面一个swf跟下面一个中间是没有间隙的，而对于ie8,firefox3,chrome1，显示时，两个flash中间都出现的间隙，整了一整天，也不知道为什么，最后发现在将html头部的</p>
<p>&lt;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Strict//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#8221;&gt;改成</p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<p>问题竟然解决了，晕哦，但是要真想在 XHTML 1.0 Strict 下正常显示中间无缝隙该怎么做呢？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acroidea.com/index.php/2009/04/06/html-version-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox下IFrame显示的BUG</title>
		<link>http://www.acroidea.com/index.php/2008/08/14/iframe-bug-in-firefox/</link>
		<comments>http://www.acroidea.com/index.php/2008/08/14/iframe-bug-in-firefox/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 04:20:26 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.acroidea.com/?p=82</guid>
		<description><![CDATA[发现了一些FlashPlayer 9 与FlashPlayer 10之间的不一样之处，很是怪异。 处理XML： 在Flash 10中将播放器设为Player 9后下面代码执行结果为 [xml] world [/xml] 而设为Player 10后执行结果为 [xml] world [/xml] //以下为代码 [as3] var xml:XML...]]></description>
			<content:encoded><![CDATA[<p>发现了一些FlashPlayer 9 与FlashPlayer 10之间的不一样之处，很是怪异。 处理XML： 在Flash 10中将播放器设为Player 9后下面代码执行结果为<br />
[xml]<br />
<site></p>
<p>world</p>
<p></site><br />
[/xml]<br />
而设为Player 10后执行结果为<br />
[xml]</p>
<p>world</p>
<p>[/xml]<br />
//以下为代码<br />
[as3]<br />
var xml:XML = <config><site></site></config>;<br />
xml = xml.site[0].appendChild(&#8220;
<p>world</p>
<p>&#8220;);<br />
trace(xml);<br />
[/as3]<br />
而下面这个代码的执行结果确又是一样的 //代码<br />
[as3]<br />
var xml:XML = <config><site></site></config>;<br />
xml = xml.site[0].appendChild(
<p>world</p>
<p>);<br />
trace(xml);<br />
[/as3]<br />
结果都是 <site>
<p>world</p>
<p> </site> 有点晕，不知道是何原因。所以为了防止播放器的不一致，遇到这种appendChild()里面放置字符串的情况还是改用类似下面的写法，算Flash狠了。<br />
[as3]<br />
var xml:XML = <config><site></site></config>;<br />
xml = xml.site[0].appendChild(new XML(&#8220;
<p>world</p>
<p>&#8220;));<br />
trace(xml);<br />
[/as3]<br />
这样，两个播放器也就一致了。 代码的执行顺序： 这个很有问题，如果两个代码执行顺序不一致，那可能运行的效果就完全不一致。不过两个版本确实在这方面存在差异。 如果我们只是简单地新建一个Flash文件，在里面新建一个MovieClip并且在其第一帧上增加下面的代码：<br />
[as3]<br />
trace(&#8220;onframe1 before call gotoandplay 10&#8243;);<br />
gotoAndStop(10);<br />
trace(&#8220;on frame 1 after call gotoandplay 10&#8243;);<br />
[/as3]<br />
在其第10帧处插入下面的代码：<br />
[as3]<br />
trace(&#8220;now on frame 10&#8243;);<br />
[/as3]<br />
把文件的设置中的播放器设成 Flash Player 9 或者 Flash Player 10 其执行结果是一致的，都是： onframe1 before call gotoandplay 10 on frame 1 after call gotoandplay 10 now on frame 10 也就是说是执行完第一帧上的所有代码后再执行第十帧上的代码，这一点应该是跟我们想像的一致的，也没什么异议。 但是我们改一种写法，删除刚才这个文件中的这个MovieClip中的第一帧的代码，将这个MoiveClip的Class设置成TestMC，并且新建一个TestMC.as的文件，内部代码为：<br />
[as3]<br />
package<br />
{<br />
    import flash.display.MovieClip;</p>
<p>    public class TestMC extends MovieClip<br />
    {<br />
        public function TestMC()<br />
        {<br />
            stop();<br />
            trace(&#8216;[use class]before gotoAndStop 10&#8242;);<br />
            gotoAndStop(10);<br />
            trace(&#8220;[use class]after gotoAndStop 10&#8243;);<br />
        }<br />
    }<br />
}<br />
[/as3]<br />
这样一来，在播放器设成 Flash Player 9时执行的结果是： [use class]before gotoAndStop 10 [use class]after gotoAndStop 10 now on frame 10 跟刚才的上面的顺序也是一致的，不过在将播放器设成 Flash Player 10时，执行结果却是： [use class]before gotoAndStop 10 now on frame 10 [use class]after gotoAndStop 10 也就是说这样一来，先执行被调用的帧上的代码，然后再继续现有的代码，等于是把“gotoAndStop”到的相应帧上的代码插入到现有的代码中执行，这个顺序跟之前的是完全不一样的。到底是哪一种执行的顺序是更合理的？不是很好说，不过作为一个专业级的程序员，一个好的习惯是尽量少在帧上写代码。 点击此处下载与此相关的测试文件。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acroidea.com/index.php/2008/08/14/iframe-bug-in-firefox/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
