<?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>子叶：子乌的叶子 &#187; 翻译</title>
	<atom:link href="http://sheneyan.com/blog/tag/translation/feed/" rel="self" type="application/rss+xml" />
	<link>http://sheneyan.com/blog</link>
	<description>指穷于为薪，火传也，不知其尽也。---《养生主》</description>
	<lastBuildDate>Tue, 17 Jan 2012 03:05:10 +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>运动摄影——你可能会用到的技巧</title>
		<link>http://sheneyan.com/blog/2010/11/action-photography-tips/</link>
		<comments>http://sheneyan.com/blog/2010/11/action-photography-tips/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 01:19:44 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[翻译]]></category>
		<category><![CDATA[50个摄影相关教程]]></category>
		<category><![CDATA[摄影]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[运动摄影]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1901</guid>
		<description><![CDATA[<p class="notes">子乌注：如果英文还不错的话推荐看原文，它最底下还有几篇相关的运动摄影的小贴示，值得一读。</p>
<div style="float:right;width:320px;background:#eee;padding:3px;text-align:center;"><a href="http://www.picturesocial.com/photo/isle-of-wight-tom-penny"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/action-photography.jpg" /></a><span style="display:block;font-size:10px;">“Isle Of Wight Tom Penny” captured by Feride Seferaj (Click Image to See More From Feride Seferaj)</span></div>
<ul>
<li>作者： <a href="http://www.picturecorrect.com/author/autumn-lockwood/" title="Autumn Lockwood">Autumn Lockwood</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-11-23</li>
<li>英文原文：<a href="http://www.picturecorrect.com/tips/action-photography-tips/">Action Photography &#8211;The Tips You Should Use</a></li>
</ul>
<p>拍摄运动中的杰出的照片是一件困难的任务。与其他任何类型的照片不同，运动照片要求闪电般快速的反映，坚[......]</p><p class='read-more'><a href='http://sheneyan.com/blog/2010/11/action-photography-tips/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p class="notes">子乌注：如果英文还不错的话推荐看原文，它最底下还有几篇相关的运动摄影的小贴示，值得一读。</p>
<div style="float:right;width:320px;background:#eee;padding:3px;text-align:center;"><a href="http://www.picturesocial.com/photo/isle-of-wight-tom-penny"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/action-photography.jpg" /></a><span style="display:block;font-size:10px;">“Isle Of Wight Tom Penny” captured by Feride Seferaj (Click Image to See More From Feride Seferaj)</span></div>
<ul>
<li>作者： <a href="http://www.picturecorrect.com/author/autumn-lockwood/" title="Autumn Lockwood">Autumn Lockwood</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-11-23</li>
<li>英文原文：<a href="http://www.picturecorrect.com/tips/action-photography-tips/">Action Photography &#8211;The Tips You Should Use</a></li>
</ul>
<p>拍摄运动中的杰出的照片是一件困难的任务。与其他任何类型的照片不同，运动照片要求闪电般快速的反映，坚实的构图和其他其他相片元素的基础，以及一点点运气。那就是说，只要你愿意花一些时间去理解通向这疯狂的方法，任何人都可一学会如何拍摄杰出的动作摄影。这里有一些关于如何让你开始运动摄影的技巧。</p>
<h4>知道你的拍摄目标</h4>
<p>由于你只有很短的时间进行拍摄，你对你正在拍摄的对象的理解就很重要。例如，篮球，如果你不靠近篮框，你无法获得下一个扣篮的好画面。在你开始拍摄一个正在运动的特别的对象，花时间理解你的对象，你就可以在它发生前预料到。</p>
<h4>取得运动中的拍摄目标</h4>
<p>你需要一直去试着当目标的动作处于它最大幅度时拍摄它。比如，如果当你在拍摄单板滑雪者从斜坡跃起的时候，要知道你想要什么样的镜头。如果你想要起跳，着陆，还是跳跃的最高点？如果你将运动中最有趣的部分都包含进你的照片，那会是相当令人着迷的。所以，不停地去考虑构图的最好方式吧。</p>
<h4>提前对焦</h4>
<p>许多资深摄影师会将他们的相机对焦到一个他们预期会发生些事情的地方。如果你知道你正在拍摄什么样的行动，这很简单，并且在当某人在你的画面中从空中飞过而你只有几毫秒时间反应时可以节省你宝贵的时间。</p>
<h4>跟随你的目标(Pan with your subject)</h4>
<p>在运动摄影中在最终成像里捕获到运动是很重要的。当一些拍摄对象有明显的运动，比如篮球运动员在空中暂停的扣篮，可能需要你费些神。跟随是当目标通过你面前时你移动你的相机跟上它。这带来的最终结果是拍摄目标位于清晰的焦内而背景由于相机的运动变得虚化。</p>
<div style="background:#eee;padding:3px;width:500px;"><a href="http://www.picturesocial.com/photo/the-daily-show-times-square"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/action-photography2.jpg" /></a><span style="display:block;font-size:10px">“The Daily Show: Times Square Taxi” captured by Carol Stark (Click Image to See More From Carol Stark)</span></div>
<h4>正确的胶卷及使用闪光灯</h4>
<p>高速胶卷(800或以上)是最适合于运动摄影的。高速胶卷可以让你在更多养的灯光环境下使用更快的快门速度并帮助你完美地定住动作的瞬间。对于特别快的移动，一个闪光灯也相当游泳，不过大多数消费级相机闪光灯在超过10英尺范围并不能起到很大作用。</p>
<h4>为运动设计画面</h4>
<p>不要试图在你的相片中停止拍摄对象的运动。虽然凝固一个进行中的动作是个运动摄影的好目标，不过还是要允许观赏者跟着这动作到达可能的结果。举例来说，如果你在拍摄某人从楼梯上跳跃下来，将主体定位在画面的上方并在下方保留部分楼梯会让动作的结果更加容易理解。</p>
<h4>数码化</h4>
<p>运动摄影需要非常巨大的耐心和试验，同时也需要非常大量的胶卷。感谢数码相机的到来以及他们近乎无限供应的照片（底片？），你可以不需掏空你的钱包来试验你的运动拍摄。更好的是，许多数码单反支持连拍功能，允许你在短暂瞬间拍下10-50张图像，让你有更多的机会拍下满意的作品。</p>
<div style="background:#eee;padding:3px;width:500px"><a href="http://www.picturesocial.com/photo/into-the-station"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/action-photography3.jpg" /></a><span style="display:block;font-size:10px">“Into the Station” captured by Mark Feliciano (Click Image to See More From Mark Feliciano)</span></div>
<p><strong>无论何时你拍摄运动摄影，安全都是第一要素，这样你可以避免伤害到自己或正在运动的拍摄目标。永远别将你自己置身于可能与汽车或运动员发生碰撞的位置，并确保你正在拍摄的对象知道他运动时你的位置。除此以外，你拍摄地越多，你获得更多！</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/11/action-photography-tips/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>自拍摄影指南</title>
		<link>http://sheneyan.com/blog/2010/11/self-portrait-photography-guide/</link>
		<comments>http://sheneyan.com/blog/2010/11/self-portrait-photography-guide/#comments</comments>
		<pubDate>Sun, 21 Nov 2010 01:30:50 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[翻译]]></category>
		<category><![CDATA[50个摄影相关教程]]></category>
		<category><![CDATA[摄影]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[自拍]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1876</guid>
		<description><![CDATA[<ul>
<li>作者： <a href="http://www.freephotoresources.com/author/admin/" title="Barry">Barry</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-11-21</li>
<li>英文原文：<a href="http://www.freephotoresources.com/self-portrait-photography-guide/">Self Portrait Photography Guide</a></li>
</ul>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/7022_1147787453946_1205357432_30401485_2381654_n-296x300.jpg" style="width:200px;float:left" /></div>
<p><em>在给其他人拍摄的时候一切都好，不过在你打算给自己来一张的时候怎么做？当然很容易，因为你就是那个完美的主题！？没必要解释你从拍摄中想获得什么或需要理解主题需要什么……然而，这里还是有一些你需要考虑并去做以获得尽可能完美的镜头的事，毕竟，你打算取悦的是<strong>你自己</strong>！</em></p>
<h4 style="clear:both">拍摄之前</h4>
<ul>
<li>灵感</li>
<li>地点</li>
<li>情感</li>
</ul>
<p>在每次拍摄之前要寻找灵感。可以从网上，杂志，或专辑封面等等上找到。记住你正在努力创造的你自己的影像不知是给你自己也是给其他人的，它需要可以脱颖而出并为[......]</p><p class='read-more'><a href='http://sheneyan.com/blog/2010/11/self-portrait-photography-guide/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<ul>
<li>作者： <a href="http://www.freephotoresources.com/author/admin/" title="Barry">Barry</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-11-21</li>
<li>英文原文：<a href="http://www.freephotoresources.com/self-portrait-photography-guide/">Self Portrait Photography Guide</a></li>
</ul>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/7022_1147787453946_1205357432_30401485_2381654_n-296x300.jpg" style="width:200px;float:left" /></div>
<p><em>在给其他人拍摄的时候一切都好，不过在你打算给自己来一张的时候怎么做？当然很容易，因为你就是那个完美的主题！？没必要解释你从拍摄中想获得什么或需要理解主题需要什么……然而，这里还是有一些你需要考虑并去做以获得尽可能完美的镜头的事，毕竟，你打算取悦的是<strong>你自己</strong>！</em></p>
<h4 style="clear:both">拍摄之前</h4>
<ul>
<li>灵感</li>
<li>地点</li>
<li>情感</li>
</ul>
<p>在每次拍摄之前要寻找灵感。可以从网上，杂志，或专辑封面等等上找到。记住你正在努力创造的你自己的影像不知是给你自己也是给其他人的，它需要可以脱颖而出并为此你需要为此花费时间且准备好创意。</p>
<p>选择一个能够给你感觉的地点，无论是<a href="http://www.freephotoresources.com/cityscape-urban-and-architecture-photography-showcase/">城市</a>的感觉，宁静的地方或有趣的地方，重要的是要它符合你寻找灵感时冒出的想法或创意。很显然有很多城市地域可以提供不同的可以增强影响整体感觉的光照纹理和色彩。</p>
<p>再一次，摄影的情感不止依赖于你脸上的表情也和你在此时所处的环境与<a href="http://www.freephotoresources.com/light-meter-reading-tutorial-roundup/">光照</a>有关。暗光摄影描绘了从神秘到可怕的感觉，而正确地拍摄暗光摄影则有些棘手。我个人很喜欢主题是<a href="http://www.freephotoresources.com/30-great-examples-of-silhouette-photography/">侧影</a>且很多是正确使用阴影与光线实现的影像。在‘黄金时段（<span class='notes'>根据维基百科中关于<a href="http://en.wikipedia.org/wiki/Golden_hour_(photography)">golden hour</a>的描述解释，黄金时段是指一天日照时段的第一个和最后一个小时。</span>）’拍摄的照片通常描绘温暖与快乐，而在你使用人工光线无法获得你想要的的效果时使用自然光是一个很好的方式。</p>
<div><a href="http://www.flickr.com/photos/green76/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/4818531229_56c0ba9f46_z.jpg"/></a></div>
<h4>配置</h4>
<p>首先，最好准备好下列的东西：</p>
<ul>
<li>三脚架</li>
<li>遥控或自拍定时</li>
<li>闪光灯</li>
</ul>
<p>一个三脚架、豆袋，或至少是一个放置你相机的平台是必需的。当放置相机的时候确保即将捕捉的图像包含了你打算呈现在照片中的所有元素。</p>
<p>使用遥控可以让你在拍摄前做好准备，它也可以让镜头在你就位的时候对焦到你（记住如果你在你挪动到正确位置前就对好焦距的话，相机可能没有对焦到正确的区域)。如果你没有遥控的话，那你可以使用相机上的自拍定时。自拍定时存在的问题是对焦，我的解决办法是设置焦距为16或更大以获得更大的景深以实现对焦全部内容。</p>
<p>闪光灯的使用是个人的选择，不过在较暗的环境下是必备的（除非你是个人肉雕像并能够在慢速拍摄速度下保持完全的静止。机身闪光灯可以用不过它的光线是直接的所以可能导致颜色褪色(wash out)或在你身后产生阴影。如果你有一个额外的闪光灯的话，那可以设定角度以反射角落或平面的光线来避免褪色或难看的阴影&#8211;你可以实验一下）。我通常调低闪光到3/4至1/2强度或使用柔光罩(diffuser)来柔话光线。</p>
<div><a href="http://www.flickr.com/photos/green76/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/3955697888_23d0848f84.jpg" /></a></div>
<h4>气氛</h4>
<ul>
<li>视角</li>
<li>构图</li>
<li>背景</li>
<li>取景</li>
<li>景深(散景)</li>
</ul>
<p>在大多数情况下，普通直视视角的人像摄影并不太令人印象深刻，试着改变一下视角。从地面角度往上拍或者主题（你）上方往下拍会增加一些独创性到相片中。景深可以用于制造杰出的效果，我的一个朋友曾经拍摄过坐靠在墙边的夫妻。她从地面拍摄并对焦在夫妻的鞋子上而他们俩的身体和面部都轻微地脱焦，那效果非常出色并赋予了这张不同于普通照片一个令人惊叹的因素(a &#8216;wow&#8217; factor)。</p>
<p>背景(前面提及过)是一个照片非常重要的因素，需要被仔细考虑。太多颜色或纹理会让你处于失去焦点的危险中，而不够则会让照片变得无聊（除非你要限制到最低额度的费用！）使用慢速同步闪光可以让你将主体（你）位于焦距内而拖动快门（<span class='notes'>？原文如此：drag the shutter</span>）来虚化背景并加强相片内的色彩。</p>
<p>在拍摄前取景亦相当重要。确保你需要的所有元素都在取景框中而你不想捕获的事物（路牌、行人等）不被摄入！也要考虑你计划使用的景深以及拍摄的元素会有怎样的效果，如果使用浅景深的话则背景里的光线可以用来创建一个很酷的<a href="http://www.freephotoresources.com/photography-techniques-try-something-new/">散景</a>效果，这会给你的相片加分。</p>
<div><a href="http://www.flickr.com/photos/green76/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/4166263785_f56b7cba38.jpg" /></a></div>
<h4>主题(你！)</h4>
<ul>
<li>情感</li>
<li>眼光接触</li>
<li>衣服</li>
<li>姿势(坦率?)</li>
</ul>
<p>一张拍摄一个人直盯着相机的照片并不高明。试着去描述一种情感，无论是喜悦、兴奋、悲伤或者神秘，你必须得集中并在拍摄之前准备好你打算的表情/姿势。</p>
<p>让你的衣服匹配你的表情，五颜六色的衣服可以表达喜悦，灰暗邋遢的衣服可以让人联想到城市的感觉，等等等等。你衣服的颜色也会影响正在看照片的人的当前的情绪并将其带入其中。</p>
<p>你想直接看着相机与否，完全取决于你是否打算摆造型或者拍一张更<a href="http://www.freephotoresources.com/candid-photography-explained-and-gallery/">坦率</a>的相片。</p>
<h4>处理</h4>
<ul>
<li>效果</li>
<li>喜欢的和不喜欢的</li>
<li>裁剪</li>
<li>黑白摄影</li>
</ul>
<p>有无数的特别为人像相片设计的<a href="http://www.squidoo.com/plugin">Photoshop插件</a>可以加强你的相片和读取次数。试试一下，它们中有很多都是免费的，而<a href="http://www.freephotoresources.com/great-photography-plugins/">这里</a>可以找到一些杰出的插件。</p>
<p>当你看你的照片的时候想想为什么你喜欢特定的几张而又为什么不喜欢其他的。通过这种方式你可以开始掌握你的自拍技术，只使用那些吸引你的元素而排除其他的。</p>
<p>裁剪也是一个你可以玩出出色效果的领域，你可以剪掉相片中无用的元素并创造出一个出色的原创构图。</p>
<p>拍摄彩色相片的同时也尝试一下黑白照片。Picasa有一个出色的工具叫做“Filtered Black and White”，这允许你不只是将图片转换为黑白，也可以使用滴管工具(eye dropper)来改变相片的色调。</p>
<div><a href="http://www.flickr.com/photos/millylillyrose/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/342634620_9d655dfd69.jpg" /></a></div>
<p>By millylillyrose</p>
<div><a href="http://www.flickr.com/photos/jamadams/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/307649008_273faac6c4.jpg" /></a></div>
<p>By Jam Adams</p>
<div><a href="http://www.flickr.com/photos/elijah/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/318152555_4f09da44e1.jpg" /></a></div>
<p>By wanderinghome</p>
<div><a href="http://www.flickr.com/photos/bunton/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/3135896011_9a0226806a.jpg" /></a></div>
<p>By Pablo-Hidalgo</p>
<div><a href="http://www.flickr.com/photos/shanegorski/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/2716680386_a59b0d7192.jpg" /></a></div>
<p>By country_boy_shane</p>
<div><a href="http://www.flickr.com/photos/acain/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/2224100039_ced47b1394.jpg" /></a></div>
<p>By Anthony Cain &copy;</p>
<div><a href="http://www.flickr.com/photos/24258698@N04/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/2615656715_2a80792602.jpg" /></a></div>
<p>By andronicusmax</p>
<div><a href="http://www.flickr.com/photos/jeremypullen/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/2942906283_a5482fd4b1.jpg" /></a></div>
<p>By mjp!</p>
<div><a href="http://www.flickr.com/photos/adevlinphotography/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/2221637270_27e359b57c.jpg" /></a></div>
<p>By &copy; AK Foto</p>
<div><a href="http://www.flickr.com/photos/bbernardes/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/249099742_3c2e62dd8e.jpg" /></a></div>
<p>By brunotresinari</p>
<div><a href="http://www.flickr.com/photos/morberg/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/3256272934_a405937b5d.jpg" /></a></div>
<p>By morberg</p>
<div><a href="http://www.flickr.com/photos/lucianvenutian/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/2091460926_b1fe50c290.jpg" /></a></div>
<p>By lucianvenutian</p>
<div><a href="http://www.flickr.com/photos/jacobwhittaker/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/439046462_9faa502232.jpg" /></a></div>
<p>By Jacob Whittaker</p>
<div><a href="http://www.flickr.com/photos/green76/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/4828068682_2e5df61c7c.jpg" /></a></div>
<p>By FreePhotoResources</p>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/11/self-portrait-photography-guide/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>在Photoshop中给黑白照片手工上色</title>
		<link>http://sheneyan.com/blog/2010/11/hand-colouring-a-black-and-white-photo/</link>
		<comments>http://sheneyan.com/blog/2010/11/hand-colouring-a-black-and-white-photo/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 01:34:43 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[翻译]]></category>
		<category><![CDATA[50个摄影相关教程]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[黑白摄影]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1845</guid>
		<description><![CDATA[<ul>
<li>作者：<a href="http://www.photoshopsupport.com/tutorials/jf/jennifer-farley.html">Jennifer Farley</a>
</li><li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-11-20</li>
<li>英文原文：<a href="http://www.photoshopsupport.com/tutorials/jf/hand-colouring-a-black-and-white-photo/hand-colouring-a-black-and-white-photo.html">Hand Colouring A Black And White Photo In Photoshop</a></li>
</ul>
<p>你可以在Photoshop中使用很多种方法来给一张黑白照片上色。在这个教程中，我试着使用选区和调整图层上色。事先声明，<span style="">效果看起来并不太自然！</span>它看起来并不像一张彩色照片，但很有一种复古的风格，在老照片上效果更佳。不过，没人会将它用在原彩色照片上。</p>
<h4>步骤1</h4>
<p>在Photoshop中打开一张黑白照片。我使用的是来自Alfred Hitchcock（希区柯克）导演的《Vertigo(迷魂记)[......]</p><p class='read-more'><a href='http://sheneyan.com/blog/2010/11/hand-colouring-a-black-and-white-photo/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<ul>
<li>作者：<a href="http://www.photoshopsupport.com/tutorials/jf/jennifer-farley.html">Jennifer Farley</a>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-11-20</li>
<li>英文原文：<a href="http://www.photoshopsupport.com/tutorials/jf/hand-colouring-a-black-and-white-photo/hand-colouring-a-black-and-white-photo.html">Hand Colouring A Black And White Photo In Photoshop</a></li>
</ul>
<p>你可以在Photoshop中使用很多种方法来给一张黑白照片上色。在这个教程中，我试着使用选区和调整图层上色。事先声明，<span style="">效果看起来并不太自然！</span>它看起来并不像一张彩色照片，但很有一种复古的风格，在老照片上效果更佳。不过，没人会将它用在原彩色照片上。</p>
<h4>步骤1</h4>
<p>在Photoshop中打开一张黑白照片。我使用的是来自Alfred Hitchcock（希区柯克）导演的《Vertigo(迷魂记)》。照片来源是<a href="http://movieweb.com">movieweb.com</a>，一个有大量高清剧照的资源网站（<span class="notes">不知道是关了还是天朝网络问题，我无法打开该网站。</span>）</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/hand-colouring-a-black-and-white-photo-01.jpg" /></div>
<h4>步骤2</h4>
<p>选择 图像>模式>RGB，将照片从灰度(grayscale)模式改为RGB颜色模式。现在我们将选择图像的不同部分，并将它们粘帖到新的独立层中。这里可以使用快速蒙版。</p>
<h4>步骤3</h4>
<p>选择快速蒙版(Q)并选择一个合适的笔刷尺寸。在图片里皮肤的任意区域开始涂。使用黑色涂中的区域会显示为粉红色，这是会被选中的区域。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/hand-colouring-a-black-and-white-photo-02.jpg" /></div>
<h4>步骤4</h4>
<p>确保眼睛没有被选中。如果你已经选中了它们，只要将笔刷前景色改为白色并将他们涂掉以取消选区。你可以通过这种方式随时还原你的错误操作并“站在线外（意为不犯错～）”。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/hand-colouring-a-black-and-white-photo-03.jpg"/></div>
<h4>步骤5</h4>
<p>当你成功地将皮肤全部选中时（没有衣服，没有眼睛，没有背景！），再按一下Q，从快速蒙版模式切换回普通模式。你会看到你用黑色涂画的区域已经被选中。我们可以使用快捷键Shift+Ctrl+I(win)或Shift+Cmd+I(mac)来反向选中。</p>
<h4>步骤6</h4>
<p>使用快捷键Ctrl+C(win)或Cmd+C(mac)复制选区。</p>
<h4>步骤7</h4>
<p>使用快捷键Ctrl+V(win)或Cmd+V(mac)将选区粘帖回来。这会将皮肤选区粘帖到一个新层。在图层面板中重命名层（双击当前名称&#8211;Layer 1）为，嗯，比如叫Skin。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/hand-colouring-a-black-and-white-photo-04.jpg" /></div>
<h4>步骤8</h4>
<p>重复步骤3-7，这样你就有了不同的层：头发，上衣（我将男士和女士分为不同的层），背景及其它任何你想上色的区域。你的图层面板最终看起来像这样：</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/hand-colouring-a-black-and-white-photo-05.jpg" /></div>
<h4>步骤9</h4>
<p>现在每个部分都被隔离，我们可以开始上色了！</p>
<h4>步骤10</h4>
<p>单击皮肤图层来选中它。选择 图层>新调整图层>图层>色彩平衡。我将新的调整图层命名为“skin”并单击复选框“使用上一图层创建剪贴蒙版”让其处于选中状态（框里出现勾）。点击确定。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/hand-colouring-a-black-and-white-photo-06.jpg" /></div>
<h4>步骤11</h4>
<p>现在打开了色彩平衡对话框，在这里你可以决定你打算设置什么样的颜色。如果你想要一个外星人的外表，你可以给你的主角绿色或蓝色的皮肤。我使用下列的配置来设置我的图片：</p>
<p>Shadows: +81 -8 -31</p>
<p>Midtones: +12 -7 -17</p>
<p>Highlight: +8 +4 -9</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/hand-colouring-a-black-and-white-photo-07.jpg" /></div>
<p>点击确定后你就设置完成一个调整图层，而不会影响你原有图像的内容。如果要回去修改设置，双击形状上的缩略图。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/hand-colouring-a-black-and-white-photo-08.jpg"/></div>
<p>现在看起来已经非常酷了！</p>
<h4>步骤12</h4>
<p>针对图像已经独立的每一部分重复步骤10和11，设置你调整图层和你希望的颜色。我的最终图像看起来就象这样：</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/hand-colouring-a-black-and-white-photo-09.jpg"/></div>
<p>很值得花费时间在正确的初始化选区上，那样你就可以轻松地拾取和选择调整图层的颜色。</p>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/11/hand-colouring-a-black-and-white-photo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HDR详述</title>
		<link>http://sheneyan.com/blog/2010/10/hdr-explained/</link>
		<comments>http://sheneyan.com/blog/2010/10/hdr-explained/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 16:52:10 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[翻译]]></category>
		<category><![CDATA[50个摄影相关教程]]></category>
		<category><![CDATA[hdr]]></category>
		<category><![CDATA[摄影]]></category>
		<category><![CDATA[教程]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1721</guid>
		<description><![CDATA[<ul>
<li>作者： <a href="http://www.freephotoresources.com/author/admin/" title="Barry">Barry</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-25</li>
<li>英文原文：<a href="http://www.freephotoresources.com/hdr-explained/">HDR Explained</a></li>
</ul>
<h4>什么是HDR?</h4>
<p>HDR意为高动态范围。当你拍摄一张普通相片时在相机上可能可以通过修改设置将高光或低光或中间调整合——并不总是需要所有三个部分。</p>
<p>HDR的实现是通过“包围”多次拍摄，每次强调不同的亮度区域，如果其合成为一张“HDR”图像——拥有高光、低光和中间调的细节。</p>
<h4>我需要做什么？</h4>
<ol>
<li>如果你拥有一台可以自动包围曝光的相机，那会是一个巨大的优势。如果你没有，那你可以在每次拍摄的时候手动调节曝光。</li>
<li>一个用于放置相机的三脚架或其他什么东西是必备装备，因为你每次拍摄时都要获得完全[......]</li></ol><p class='read-more'><a href='http://sheneyan.com/blog/2010/10/hdr-explained/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<ul>
<li>作者： <a href="http://www.freephotoresources.com/author/admin/" title="Barry">Barry</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-25</li>
<li>英文原文：<a href="http://www.freephotoresources.com/hdr-explained/">HDR Explained</a></li>
</ul>
<h4>什么是HDR?</h4>
<p>HDR意为高动态范围。当你拍摄一张普通相片时在相机上可能可以通过修改设置将高光或低光或中间调整合——并不总是需要所有三个部分。</p>
<p>HDR的实现是通过“包围”多次拍摄，每次强调不同的亮度区域，如果其合成为一张“HDR”图像——拥有高光、低光和中间调的细节。</p>
<h4>我需要做什么？</h4>
<ol>
<li>如果你拥有一台可以自动包围曝光的相机，那会是一个巨大的优势。如果你没有，那你可以在每次拍摄的时候手动调节曝光。</li>
<li>一个用于放置相机的三脚架或其他什么东西是必备装备，因为你每次拍摄时都要获得完全一致的图像，一旦移动将前功尽弃。如果沒有三腳架，你也可以使用豆袋甚或是一件短上衣来安置相机。</li>
<li>使用诸如Photoshop或Photomatix的软件来将你的多张照片生成HDR。</li>
</ol>
<h4>我怎么拍摄照片？</h4>
<p>我<strong>一直</strong>使用三脚架拍摄HDR。我设置我的自动包围曝光为每隔ev2/3拍摄三张。再每隔ev1拍三张（这样做只是为了在待会合并照片时有两种选择并能通过试验和失败决定适合的设定。）</p>
<p>如果你在拍摄动态的主题如人或树(<span class="notes">原文笔误，写成people of trees，看到后面才明白过来那是or不是of……</span>)，你最好等待动作最小的时候以避免在最终结果中出现鬼影——虽然Photomatix有选项可以去除这个效果。</p>
<h4>拍摄什么？</h4>
<ul>
<li><strong>街景</strong></li>
</ul>
<p>当我外出寻找HDR图像的主题时我会寻找很多事物。颜色是一个伟大的开始，在下面这张拍摄于温莎的图像中，气球和建筑的颜色通过HDR处理完全展现出来了。</p>
<div><img class="size-full wp-image-147 alignnone" title="windsor-alley1" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/windsor-alley1.jpg" alt="windsor-alley1" width="502" height="334" /></div>
<ul>
<li><strong>天空</strong></li>
</ul>
<p>也要注意观察天空，一片深蓝的天空加上奇形怪状的云会给任何照片带来戏剧性的效果，将他们与一个不错的前景进行合成，你就成功了一半。</p>
<div><img class="alignnone" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/3538421616_7f6bf7ea57.jpg" alt="" width="500" height="333" /></div>
<ul>
<li> <strong>落日</strong></li>
</ul>
<p>对于通常的照片来说落日是很出彩的，不过如果你使用HDR技术的话，那会带给你完全不同的效果。</p>
<div><img class="alignnone" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/3840850812_1ab464c6a1.jpg" alt="" width="500" height="351" /></div>
<ul>
<li> <strong>水面</strong></li>
</ul>
<p>当我第一次拍摄三张水面的照片时我猜测因为水面的波动我处理的三张照片会完全不同。然而这完全不是问题，效果很完美（我还是想不明白为什么水波的位置每次都完全一样！）</p>
<div><a href="http://www.flickr.com/photos/green76/"><img class="alignnone" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/3477767518_8c0d31b58b.jpg" alt="" width="500" height="249" /></a></div>
<h4>创建HDR图像</h4>
<p>一旦你从相机中下载了你的照片，你需要确认你将他们按照相同的场景分组排列以使你知道哪些照片将要被合并。我始终使用三组包围曝光照片并将他们命名为A1、A2、A3、B1、B2、B3等等。</p>
<p>我的偏好是在Photomatix中创建HDR图像，然后在Photoshop中作最后处理。</p>
<h4>Photomatix</h4>
<div><img class="size-full wp-image-150 alignnone" title="example" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/example.jpg" alt="example" width="562" height="123" /></div>
<p>上面的三张照片是间隔ev 2/3 包围曝光拍摄的。都是ISO100和F22，不过曝光时间分别是1/30秒、1/40秒和1/50秒。</p>
<p>在Photomatix中加载它们；</p>
<div><img class="size-full wp-image-152 alignnone" title="photomatix1" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix1.jpg" alt="photomatix1" width="130" height="246" /></div>
<p>从屏幕左侧的菜单中选择 “<strong>Generate HDR image</strong>” &#8230;</p>
<div><img class="size-full wp-image-153 alignnone" title="photomatix2" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix2.jpg" alt="photomatix2" width="291" height="192" /></div>
<p>下一步选择 “<strong>Browse</strong>” ，使用“CTRL”和鼠标左键选中图像来选中三张（或更多）图像。当你选中所有需要的图像后点击“Open”&#8230;</p>
<div><img class="size-full wp-image-155 alignnone" title="photomatix3" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix3.jpg" alt="photomatix3" width="294" height="193" /></div>
<p>你会看到如上图的界面。这里只是告诉你你选择了哪些文件并允许你随意添加或删除，如果你对你的选择满意，点击 &#8216;OK&#8217;&#8230;&#8230;</p>
<div><img class="size-full wp-image-157 alignnone" title="photomatix4" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix4.jpg" alt="photomatix4" width="302" height="274" /></div>
<p>窗口 <strong>&#8216;Generate HDR &#8211; Options</strong>&#8217; 允许你在处理图像前修改以下选项：</p>
<ol>
<li><strong>Align source images</strong> &#8211; 如果你觉得你的几张照片中可能存在移动，你可以选择这个选项，允许Photomatix来对齐图像。它会通过执行两种方法（你可以选择）来试图对齐图像——水平或纵向平移以使图像内的特征点对齐（我通常会选择这个选项）。选择对齐图像意味着程序会花上比正常情况下长得多的时间来创建图像。</li>
<li><strong>Attempt to reduce ghosting artifacts</strong> &#8211; 如果在图像内有一些什么发生了移动，例如人或者树或别的什么，这个选项会告诉Photomatix尝试减少“鬼影”效果（由于在不同的照片中捕捉到物体的移动，导致结果中存在多个独立的树或人——举例）。</li>
<li><strong>Take tone curve of colour profile</strong> &#8211; 这个选项意味着Photomatix会使用原图像的配色方案。当原图像由数码单反相机拍摄或者自RAW文件转换而来。（我通常会让这个选项被勾中）。</li>
<li><strong>Attempt to reverse-engineer tone curve applied</strong> &#8211; 当图像来自于扫描电影或用紧凑型相机或傻瓜机拍摄，可能值得勾选这个选项（但我从来没用过）。</li>
</ol>
<p>一旦你对选项满意就点击 &#8216;<strong>OK</strong>&#8217;&#8230;</p>
<div><img class="size-full wp-image-158 alignnone" title="photomatix5" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix5.jpg" alt="photomatix5" width="526" height="367" /></div>
<p>当Photomatix开始处理对齐和去鬼影操作时你会看到一个HDR图像的原型显示出来。别担心它看起来还不够“HDR化”，这只是个有趣的开始&#8230;</p>
<div><img class="size-full wp-image-160 alignnone" title="photomatix61" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix61.jpg" alt="photomatix61" width="590" height="381" /></div>
<p>点击屏幕左方的按钮 <strong>&#8216;Tone mapping&#8217;</strong> ，Photomatix会给你看图像预览，而你可以通过调整显示在左边菜单上的不同选项来调节以获得一个更“HDR化”的图像。</p>
<div><img class="size-full wp-image-161 alignnone" title="photomatix7" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix7.jpg" alt="photomatix7" width="186" height="447" /></div>
<p>在标签页 &#8216;<strong>Details Enhancer</strong>&#8217; 你可以修改以下选项：</p>
<p><strong>Strength</strong> &#8211; 这是一个HDR处理过程中的全局效果，我通常将其设为100%（默认值），你绕过它通过其他选项来调整图像。</p>
<p><strong>Colour Saturation</strong> &#8211; 真的很明显，这个是图像中颜色的数目，你说了算！</p>
<p><strong>Light Smoothing</strong> &#8211; 这个选项控制图像中的对比变化，通常我勾选从第二或第三个选项，勾选第一个的话图像看起来会像上面那个一样。</p>
<div><img class="size-full wp-image-162 " title="photomatix8" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix8.jpg" alt="photomatix8" width="610" height="116" /></div>
<p>这三个图像显示了勾选“Light Smoothing”的第一、二、三个选项框的效果。</p>
<p><strong>Luminosity</strong> &#8211; 这个滑动条会调高阴影亮度并增加图像对比度。</p>
<p>接下来你可以单独进行对图像的设定&#8230;</p>
<div><img class="size-full wp-image-165 alignnone" title="photomatix9" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix9.jpg" alt="photomatix9" width="225" height="181" /></div>
<p><strong>White Point</strong> &#8211; 增加图像高亮处的亮度。</p>
<p><strong>Black Point</strong> &#8211; 增加图像阴影的效果及对比度。</p>
<p><strong>Gamma</strong> &#8211; 全局角度下调亮或调暗图像。</p>
<div><img class="size-full wp-image-166 alignnone" title="photomatix10" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix10.jpg" alt="photomatix10" width="218" height="153" /></div>
<p><strong>Temperature</strong> &#8211; 增加图片的色温，你设定的越高，图像越红，蓝色越少。</p>
<p><strong>Saturation Highlights</strong> &#8211; 增加图像高亮处的颜色。</p>
<p><strong>Saturation Shadows</strong> &#8211; 增加图像阴影/低亮处的颜色。</p>
<div><img class="size-full wp-image-167 alignnone" title="photomatix11" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix11.jpg" alt="photomatix11" width="220" height="155" /></div>
<p><strong>Micro Contrast</strong> &#8211; 这个选项调节图像高亮和阴影处的对比度。</p>
<p><strong>Micro Smoothing </strong> &#8211; 选项全局平滑图像，在我看来，减少过度的HDR效果。</p>
<div><img class="size-full wp-image-168 alignnone" title="photomatix12" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix12.jpg" alt="photomatix12" width="220" height="153" /></div>
<p><strong>Highlights Smoothing</strong> &#8211; 只平滑图像的高亮处，它能帮助生成图像中对象周围的“日晕”效果，但也可以用于“清洗”过度的高亮效果。</p>
<p><strong>Shadows Smoothing</strong> &#8211; 只是用于平滑低亮处和阴影。</p>
<p><strong>Shadows Clipping</strong> &#8211; 增加阴影密度，设定为低值的时候你可以在阴影中看到其他细节，如果你调高这个值，则阴影会变得更暗且丢失掉任何细节。</p>
<p>适应这些控制的最好方法就是不断地去用他们直到你对输出感到满意。一旦达到你要的效果，点击“Process”&#8230;</p>
<div><img class="size-full wp-image-169 alignnone" title="photomatix13" src="http://sheneyan.com/blog/wp-content/uploads/2010/10/photomatix13.jpg" alt="photomatix13" width="546" height="345" /></div>
<p>一旦你完成了图像，选择“File/Save As”保存你的图像。这时候我通常在Photoshop中打开它并调整曲线等。</p>
<h4>资源</h4>
<ul>
<li><a href="http://www.vanilladays.com/hdr-guide/" target="_blank">Vanilla Days</a></li>
<li><a href="http://backingwinds.blogspot.com/2006/10/how-to-create-professional-hdr-images.html" target="_blank">Backing Winds</a></li>
<li><a href="http://www.photoshopcafe.com/tutorials/HDR_ps/hdr-ps.htm" target="_blank">Photoshop Cafe</a></li>
<li><a href="http://abduzeedo.com/how-create-hdr-photos-hdrphotomatix-tutorial" target="_blank">Abduzeedo</a></li>
</ul>
<h4>Flickr上的一些示例</h4>
<div><a href="http://www.flickr.com/photos/theenginedriver/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/1740359504_f854919d4c.jpg" alt="By Daniel Raphael Cooper: Shootin Silly" width="500" height="341" /></a></div>
<p>By Daniel Raphael Cooper: Shootin&#8217; Silly </p>
<div><a href="http://www.flickr.com/photos/bcnbits/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/331201743_93a5157bc2.jpg" alt="By MorBCN" width="500" height="351" /></a></div>
<p>By MorBCN</p>
<div><a href="http://www.flickr.com/photos/rsdreamphotos/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/2268052696_14c3150da3.jpg" alt="By Robert Scott Photography.ca" width="500" height="351" /></a></div>
<p>By Robert Scott Photography.ca</p>
<div><a href="http://www.flickr.com/photos/akc77/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/414546419_30d4003e74.jpg" alt="By alexkess" width="500" height="335" /></a></div>
<p>By alexkess</p>
<div><a href="http://www.flickr.com/photos/stawarz/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/2355889974_afc512138d.jpg" alt="By Andrew Stawarz" width="500" height="332" /></a></div>
<p>By Andrew Stawarz</p>
<div><a href="http://www.flickr.com/photos/kiaorabro/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/142764152_ddcfd28218.jpg" alt="By Bring back Buck" width="500" height="337" /></a></div>
<p>By Bring back Buck</p>
<div><a href="http://www.flickr.com/photos/left-hand/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/2289077059_6af1c1f1b3.jpg" alt="By left-hand" width="500" height="333" /></a></div>
<p>By left-hand</p>
<div><a href="http://www.flickr.com/photos/dannwunderlich/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/539982032_e71c5ffd19.jpg" alt="By Wunderlich Photography" width="500" height="339" /></a></div>
<p>By Wunderlich Photography</p>
<div><a href="http://www.flickr.com/photos/13kingdoms/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/134947756_6141ab1485.jpg" alt="By bmooneyatwork" width="500" height="375" /></a></div>
<p>By bmooneyatwork</p>
<div><a href="http://www.flickr.com/photos/zhzheka/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/701816373_8535b37f71.jpg" alt="By EugeniusD80" width="500" height="334" /></a></div>
<p>By EugeniusD80</p>
<div><a href="http://www.flickr.com/photos/loneprimate/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/111471138_fc0545f97f.jpg" alt="By Lone Primate" width="500" height="375" /></a></div>
<p>By Lone Primate</p>
<p><strong>黄金法则 &#8211; 不要过度HDR!</strong> &#8211; 一个过度HDR的图像看着像一个很垃圾的卡通画（我的观点）。</p>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/10/hdr-explained/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>如何捕捉令人惊叹的艺术风景照片</title>
		<link>http://sheneyan.com/blog/2010/10/how-to-capture-stunning-fine-art-landscape-photographs/</link>
		<comments>http://sheneyan.com/blog/2010/10/how-to-capture-stunning-fine-art-landscape-photographs/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 15:40:38 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[翻译]]></category>
		<category><![CDATA[50个摄影相关教程]]></category>
		<category><![CDATA[摄影]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[风景摄影]]></category>
		<category><![CDATA[黑白摄影]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1681</guid>
		<description><![CDATA[<ul>
<li>作者： <a href="http://photo.tutsplus.com/author/andrew-gibson/">Andrew Gibson</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-23</li>
<li>英文原文：<a href="http://photo.tutsplus.com/tutorials/shooting/how-to-capture-stunning-fine-art-landscape-photographs/">How To Capture Stunning Fine Art Landscape Photographs</a></li>
</ul>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/19-49_photography_photoshop_art_landscape_photographs.jpg"/></div>
<p>几乎每个我在摄影杂志上看到过的调查，询问读者最喜欢的主题，都有相同的赢家——风景。为什么？我猜是因为风景摄影看起来是一个相对容易些的主题。大多数人居住在某种类型的风景点或者在它的附近，而我相信大多数摄影师喜欢捕捉在他们周围的自然美景。</p>
<p>现在我们将从新的角度来探讨景观摄影的理念——艺术、黑白。除了解释其原理并思考背后的技术，我还会提供一些入门的提示。</p>
<h4>什么是艺术(Fine Ar[......]</h4><p class='read-more'><a href='http://sheneyan.com/blog/2010/10/how-to-capture-stunning-fine-art-landscape-photographs/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<ul>
<li>作者： <a href="http://photo.tutsplus.com/author/andrew-gibson/">Andrew Gibson</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-23</li>
<li>英文原文：<a href="http://photo.tutsplus.com/tutorials/shooting/how-to-capture-stunning-fine-art-landscape-photographs/">How To Capture Stunning Fine Art Landscape Photographs</a></li>
</ul>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/19-49_photography_photoshop_art_landscape_photographs.jpg"/></div>
<p>几乎每个我在摄影杂志上看到过的调查，询问读者最喜欢的主题，都有相同的赢家——风景。为什么？我猜是因为风景摄影看起来是一个相对容易些的主题。大多数人居住在某种类型的风景点或者在它的附近，而我相信大多数摄影师喜欢捕捉在他们周围的自然美景。</p>
<p>现在我们将从新的角度来探讨景观摄影的理念——艺术、黑白。除了解释其原理并思考背后的技术，我还会提供一些入门的提示。</p>
<h4>什么是艺术(Fine Art)？</h4>
<p>具有讽刺意味的是实际上景观摄影很难拍好。你不仅需要找到用于拍摄的漂亮风景，同时还需要天气和光线一起配合、创造条件，来让你能够以符合你的创造性视觉感受的方式来拍摄风景照。这需要一种奉献，是我们大多数人所不具备的。</p>
<p>一些景观摄影师工作于艺术领域。什么是艺术？一个不错的定义是这些艺术摄影是那些以挂在人们的房间或办公室的墙上为最终目的图像设计。艺术摄影师，摆脱了商业摄影采购库存的限制和摄影编辑，拥有极大的创作自由。他们可以追求他们的个人视角并有很多选择了黑白摄影。</p>
<p>这篇文章是关于你怎样才能也弄出一些黑白艺术景观照。它介绍思路而非技术（不过我们在站上也有一些其他的关于技巧的文章，在文末有链接。）它也涉及灵感，最后还有些我们喜欢的黑白摄影艺术家的链接。</p>
<h4>为什么要黑白照？</h4>
<p>当我们身处景点，我们看到的是它的色彩。黑白摄影会将颜色剔除，只留下它的本质。景观的特色，例如岩石、树木和山脉，成为了由光、纹理和色调对比组成的元素。黑白是美丽的。这照片成为风景的诠释而非文字的描述。我们会看到艺术家个人的视点，对景色的情绪反应，就好像我们身临其境。</p>
<h4>1. 旅行</h4>
<p>一个严酷的事实是，我们中的大多数人不会有幸生活在这个世界上最美丽的风景附近。而好处是，当我们在假期中前往这些地方的时候，我们可以用新鲜的眼光来看这些地方。</p>
<p>我永远不会忘记我第一次前往安第斯山脉的旅行，途中穿越了偏僻的城镇、村庄以及山谷。它是如此的壮观且生动，以至于我拍下了数百张的照片。这次经验的记忆会一直伴随着我。这是我在这次旅途中留下的一张风景照：</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/01.jpg" alt="" /></div>
<h4>2. 待在家里</h4>
<p>另一方面，待在家里或者去一个离你的住处相对较近的地方欣赏一处风景，意味着你对这个地方了解的透彻。你可以深入并发现那些典型的访客绝不会发现的隐秘角落。你可以在各个季节里了解（并拍下）这个地方的景色。</p>
<p>听起来和第一点矛盾？有一点。这是有两个入口的房间。我们中的大部分人每年会花数周旅行，而剩下的时间用于了解我们附近的区域。这张照片拍摄于晚春，那是我一年中最喜欢的时候，拍摄的是那个时候到我家的几百米距离：</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/02.jpg" alt="" /></div>
<h4>3. 光线、主题和构图</h4>
<p>我将照片看成一个三角形。一边代表主题，另一边是光线，第三边是构图。一张出色的照片会有完美的光线、出色的构图和出彩的主题。每一个元素都一样重要。失去任何一个照片都将不再完美。一张有着无聊主题的照片即使拥有漂亮的构图和光线也永远比不上相同情况下主题有趣的照片。</p>
<p>这对于黑白风景摄影师来说意味着什么？你需要找到最有趣的风景。它们的趣味点可以在于戏剧性（如安第斯山脉）或静谧（好像本地的小树林），但它们必须有趣。</p>
<p>然后你需要找到最能够表现出你对这片风景个人视角的构图与光线。这片风景给你的感受是什么？什么样的光线和构图可以将这感受传递给观看者？如果你能够解答这个问题，你就在成为一个伟大艺术风景摄影师的道路上。</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/03.jpg" alt="" /></div>
<h4>4. 风景中的人们</h4>
<p>大部分风景并非纯粹的荒野。人们生活并工作于其中。好的摄影作品会讲述并探索他们的故事。生活在景区的人们的故事是一个值得探索的重大主题。对我来说，看起来在旅途上比在家里要容易的多，可能是因为我看到的每件事都是如此的新奇且令人兴奋。</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04.jpg" alt="" /></div>
<p>照片中的人的工作是从Salinas Grandes，阿根廷西北部的大盐田中提取盐。这张照片反应了他和他工作着的这片超俗的景色之间的联系。</p>
<p>另一个方法是将人物放入景观中。一个时尚摄影师如一个艺术人体摄影师也会这么做（时尚摄影师有时候也会创造艺术！）这个景观中的人体是个常见场景。摄影师可以将女体的柔和曲线和苍白皮肤与，比如，石头的硬朗外形和环境中的其他元素进行对比。</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/05.jpg" alt="" /></div>
<p>这张照片将这个女孩与黑色的火山岩沙和海岸线形成对比。女孩皮肤和黑色沙石色调的对比是构成这张照片的重要的视觉元素。</p>
<h4>5. 历史景观</h4>
<p>人会将他的痕迹留在风景中。令人欣慰的是，不是到处都有，不过还有很多地方的建筑、墙、道路和树与河流一样是景观的一部分。当人造的元素足够老，以至于看起来已经成为环境中自然的一部分的时候，那是非常美丽的。</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/06.jpg" alt="" /></div>
<p>这张关于阿根廷安第斯地区的古老村庄的照片展示了老建筑与风景之间的关联。</p>
<h4>6. 风景里的人类</h4>
<p>还可以探索人类与环境的关系——人们刚刚到达或已经造成破坏性影响的地方。也许你已经看过Sebastiao Salgado 关于<a href="http://www.flickr.com/photos/1479580@N02/page1/">巴西金矿工人</a>的照片。这些地狱般的场景由一个追求个人视角的世界级摄影记者所摄。他们的故事，和其中反应出的信息，十分厚重。</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/07.jpg" alt="" /></div>
<p>这辆老车拍摄于阿拉斯加的Ketchikan。展示了人类对环境的影响的同时，它还是另一个色调对比的例子——深色背景下的白色汽车。</p>
<h4>7. 特写</h4>
<p>风景照不只是横扫全景或者戏剧性视图。有些时候，一个细节可以和一个宽幅视角所表达的一样多。细节是一个检视你个人视角的好方法。全景视角很容易被其他摄影师所捕捉，且很难在这些地方拍出一张新颖的照片来。也就是说，细节是非常个人化的，而且如果你创作的作品通过捕捉细节来反应你对一个地方的感受，你的作品将独一无二。下面这张是我在阿拉斯加海滩上拍摄的岩石。</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/08.jpg" alt="" /></div>
<h4>8. 创作手法</h4>
<p>艺术是一种解释，它不必是文字的。你可以使用一些镜头内技术来改变镜头所看到的真实。例如你可以使用一个Lens Baby(<span class="notes">子乌注：美国产创意移轴镜头</span>)来拍摄带动态模糊的照片。我曾经使用过的另一个技术是当我拍摄时故意移动相机产生模糊效果。我是在看了风景摄影师<a href="http://www.flickr.com/photos/cfriel/">Chris Friel</a>的作品后获得这个灵感的，而且我喜欢这个效果：</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/09.jpg" alt="" /></div>
<h4>9. 极简主义</h4>
<p>有很多方式来构图，而我喜欢的是极简主义。一个极简主义构图会在照片中使用尽可能少的元素来讲述一个故事。它超越了减法原则——构图上排除一切无助于内容的元素，并试图尽可能地只捕捉一个地方的精髓。黑白摄影本身就是极简主义的一种方式——因为摄影师将颜色从照片中剥离。一个极简主义构图将这个概念进行地更彻底。</p>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/10.jpg" alt="" /></div>
<p>我使用极简主义手法在英国的Avebury Stone Circle（埃夫伯里石圈）拍摄了这张照片。我想要表现这个岩石的外形与天空的对比。</p>
<h4>10. 更多黑白摄影的技术</h4>
<p>这是一些黑白摄影教程链接，可以帮助你了解照片后期处理时的Photoshop技术：</p>
<ul>
<li><a href=" http://photo.tutsplus.com/tutorials/photography-fundamentals/mastering-the-art-of-black-and-white-photography/">Mastering the Art of Black and White Photography</a></li>
<li><a href=" http://photo.tutsplus.com/tutorials/post-processing/7-black-and-white-photoshop-conversion-techniques/">7 Black and White Photoshop Conversion Techniques</a></li>
<li><a href=" http://photo.tutsplus.com/tutorials/post-processing/mastering-the-art-of-black-and-white-toning/">Mastering the Art of Black and White Toning</a></li>
</ul>
<h4>照片画廊</h4>
<p>这是一些我所喜爱的黑白艺术摄影师。他们的作品令人经验并且是不变的灵感来源：</p>
<h5><a href="http://www.flickr.com/photos/esbozos/">Xavi Fuentes</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11.jpg" alt="" /></div>
<h5><a href="http://www.flickr.com/photos/c-l-p/">Flux</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/12.jpg" alt="" /></div>
<h5><a href="http://www.flickr.com/photos/cfriel/sets/72157601763130272/">Chris Friel</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/13.jpg" alt="" /></div>
<h5><a href="http://www.flickr.com/photos/27595401@N08/">Pica</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/14.jpg" alt="" /></div>
<h5><a href="http://www.flickr.com/photos/11179065@N02/">Femtowork</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/15.jpg" alt="" /></div>
<h5><a href="http://www.flickr.com/photos/lesbianburrito/">Kevin Saint Grey</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/16.jpg" alt="" /></div>
<h5><a href="http://www.flickr.com/photos/cardston/sets/72157600738052110/">Cardston</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/17.jpg" alt="" /></div>
<h5><a href="http://www.flickr.com/photos/36475021@N04/">Arkadius Zagrabski</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/18.jpg" alt="" /></div>
<h5><a href="http://www.flickr.com/photos/9980034@N06/">Peter Scammell</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/19.jpg" alt="" /></div>
<h4>Flickr Groups</h4>
<h5><a href="http://www.flickr.com/groups/55875961@N00/">Fine Art Classic Black and White Landscape</a></h5>
<div class="tutorial_image"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/20.jpg" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/10/how-to-capture-stunning-fine-art-landscape-photographs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>50个出色的摄影相关教程</title>
		<link>http://sheneyan.com/blog/2010/10/50-excellent-photography-related-tutorials/</link>
		<comments>http://sheneyan.com/blog/2010/10/50-excellent-photography-related-tutorials/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 13:44:38 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[TODO List]]></category>
		<category><![CDATA[日记]]></category>
		<category><![CDATA[翻译]]></category>
		<category><![CDATA[50个摄影相关教程]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[摄影]]></category>
		<category><![CDATA[教程]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1671</guid>
		<description><![CDATA[<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/19-51_photography_photoshop_tutorials_ld_img.jpg" alt="" title="50 photography tutorials" width="550" height="200" class="alignnone size-full wp-image-1674" /></div>
<p>从推特上看到<a href="http://twitter.com/arthur369">@arthur369</a>发了一个6R的<a href="http://sixrevisions.com/photography/50-excellent-photography-related-tutorials/">摄影教程列表</a>(<a href="http://designlol.net/archives/2353">@arthur369翻译的名单</a>)，看着那个心动啊，想着给自己点压力，接下来花点时间边学边翻译好了，看看能不能1天翻一篇……那也要一个多月 <img src='http://sheneyan.com/blog/wp-includes/images/smilies/icon_confused.gif' alt=':-?' class='wp-smiley' /> </p>
<p>接下来每翻译一篇就在这里加个链接，当做索引。</p>

<h4><a href="http://sheneyan.com/blog/2010/10/how-to-capture-stunning-fine-art-landscape-photographs/">1、 如何捕捉令人惊叹的艺术风景照片</a></h4>
<div><a href="http://sheneyan.com/blog/2010/10/how-to-capture-stunning-fine-art-landscape-photographs/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/19-49_photography_photoshop_art_landscape_photographs.jpg" /></a></div>
<p>通过这个易于遵循的指导学习如何拍摄漂亮的单色风景照。</p>
<h4><a href="http://abduzeedo.com/photoshop-quick-tips-light-leaks-photography-video"><del>2、Photoshop技巧：摄影中的漏光(Light Leaks)（视频）</del></a></h4>
<p>通过学习这个Photoshop视频教程获得复古风格的相片(<span class="notes">呃，把视频来回看了几遍，确定我没翻译视频的本事%</span>)。</p>
<h4><a href="http://sheneyan.com/blog/2010/10/hdr-explained/">3、HDR详述</a></h4>
<div><a href="http://sheneyan.com/blog/2010/10/hdr-explained/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/19-10_photography_photoshop_hdr_explained.jpg" /></a></div>
<p>HDR是一个流行的照片处理技术。如果你对它感兴趣[......]</p><p class='read-more'><a href='http://sheneyan.com/blog/2010/10/50-excellent-photography-related-tutorials/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/19-51_photography_photoshop_tutorials_ld_img.jpg" alt="" title="50 photography tutorials" width="550" height="200" class="alignnone size-full wp-image-1674" /></div>
<p>从推特上看到<a href="http://twitter.com/arthur369">@arthur369</a>发了一个6R的<a href="http://sixrevisions.com/photography/50-excellent-photography-related-tutorials/">摄影教程列表</a>(<a href="http://designlol.net/archives/2353">@arthur369翻译的名单</a>)，看着那个心动啊，想着给自己点压力，接下来花点时间边学边翻译好了，看看能不能1天翻一篇……那也要一个多月 <img src='http://sheneyan.com/blog/wp-includes/images/smilies/icon_confused.gif' alt=':-?' class='wp-smiley' /> </p>
<p>接下来每翻译一篇就在这里加个链接，当做索引。</p>
<hr />
<h4><a href="http://sheneyan.com/blog/2010/10/how-to-capture-stunning-fine-art-landscape-photographs/">1、 如何捕捉令人惊叹的艺术风景照片</a></h4>
<div><a href="http://sheneyan.com/blog/2010/10/how-to-capture-stunning-fine-art-landscape-photographs/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/19-49_photography_photoshop_art_landscape_photographs.jpg" /></a></div>
<p>通过这个易于遵循的指导学习如何拍摄漂亮的单色风景照。</p>
<h4><a href="http://abduzeedo.com/photoshop-quick-tips-light-leaks-photography-video"><del>2、Photoshop技巧：摄影中的漏光(Light Leaks)（视频）</del></a></h4>
<p>通过学习这个Photoshop视频教程获得复古风格的相片(<span class="notes">呃，把视频来回看了几遍，确定我没翻译视频的本事%</span>)。</p>
<h4><a href="http://sheneyan.com/blog/2010/10/hdr-explained/">3、HDR详述</a></h4>
<div><a href="http://sheneyan.com/blog/2010/10/hdr-explained/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/19-10_photography_photoshop_hdr_explained.jpg" /></a></div>
<p>HDR是一个流行的照片处理技术。如果你对它感兴趣，可以看看这篇关于HDR<br />
的快速入门教程。</p>
<h4><a href="http://abduzeedo.com/photoshop-quick-tip-overprocessing-photography"><del>4、摄影中的过度处理</del></a></h4>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/19-13_photography_photoshop_overprocessing_photography.jpg" /></div>
<p>这篇教程的目的在于教导读者如何模仿时尚摄影师Dave Hill的照片处理技术。(<span class="notes">依旧是视频教程，未翻译。</span>)</p>
<h4><a href="http://sheneyan.com/blog/2010/11/street-photography-explained/">5、街头摄影详述</a></h4>
<div><a href="http://sheneyan.com/blog/2010/11/street-photography-explained/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/19-36_photography_photoshop_street_photography_explained1.jpg" alt="" title=""/></a></div>
<p>只有深入其中才能获得不可预测的城市景观照片。这篇指南分享了拍摄杰出街头摄影的技巧与基础。</p>
<h4><a href="http://sheneyan.com/blog/2010/11/hand-colouring-a-black-and-white-photo/">6、在Photoshop中给黑白照片手工上色</a></h4>
<div><a href="http://sheneyan.com/blog/2010/11/hand-colouring-a-black-and-white-photo/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/19-23_photography_photoshop_black_and_white_photo.jpg" /></a></div>
<p>将全彩照片转换为黑白照片很容易，可是反过来应该怎么做呢？这篇photoshop教程将告诉你转换的方法。</p>
<h4><a href="http://sheneyan.com/blog/2010/11/self-portrait-photography-guide/">7、自拍摄影指南</a></h4>
<div><a href="http://sheneyan.com/blog/2010/11/self-portrait-photography-guide/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/19-15_photography_photoshop_selfportrait_photography_guide.jpg" /></a></div>
<p>摄影师们经常将他们的时间花费在镜头的另一边。如果你想让你自己成为你的主题，这篇指南针对自拍照分享了一些有用的提示。</p>
<h4><a href="http://sheneyan.com/blog/2010/11/action-photography-tips/">8、运动摄影——你可能会用到的技巧</a></h4>
<div><a href="http://sheneyan.com/blog/2010/11/action-photography-tips/"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/11/19-50_photography_photoshop_action_photography_tips.jpg" /></a></div>
<p>这篇摄影指南通过提示、技术和技巧来指导你如何运用相机来捕获动态目标。</p>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/10/50-excellent-photography-related-tutorials/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PSD/HTML转换：简洁优雅的CSS3网页布局</title>
		<link>http://sheneyan.com/blog/2010/10/psdhtml-conversion-elegant-and-simple-css3-web-layout/</link>
		<comments>http://sheneyan.com/blog/2010/10/psdhtml-conversion-elegant-and-simple-css3-web-layout/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 01:43:37 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[翻译]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[布局]]></category>
		<category><![CDATA[教程]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1613</guid>
		<description><![CDATA[<ul>
<li>作者： <a href="http://twitter.com/hatchergraphics" title="Eric Hoffman">Eric Hoffman</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-13</li>
<li>英文原文：<a href="http://sixrevisions.com/tutorials/web-development-tutorials/psdhtml-conversion-elegant-and-simple-css3-web-layout/">PSD/HTML Conversion: Elegant and Simple CSS3 Web Layout</a></li>
</ul>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-21_elegant_css3_layout_ld_img.jpg" width="550" height="250" /></div>
<p><em>这是系列教程的第二部分。<a href="http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/">第一部分</a>设计了一个简洁优雅的部落格设计。在开始这个教程之前你可以先看看第一部分以获得更大收获。</em></p>
<p><span id="more-3987"></span></p>
<h4>《简洁优雅的部落格网页布局教程》系列</h4>
<p>这篇教程是一个系列的第二集。这个部分(<strong>第二集</strong>)展示了如何利用第一集中建立的PSD设计制作一个HTML/CSS网页模板。</p>
<ul>
<li><strong>第一集：</strong><a href="http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/">使用Photoshop建立一个简洁优雅的部落格网页布局</a></li>
<li><strong>第二集：</strong><a href="http://sheneyan.com/blog/2010/10/psdhtml-conversion-elegant-and-simple-css3-web-layout/">PSD/HTML转换：简[......]</a></li></ul><p class='read-more'><a href='http://sheneyan.com/blog/2010/10/psdhtml-conversion-elegant-and-simple-css3-web-layout/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<ul>
<li>作者： <a href="http://twitter.com/hatchergraphics" title="Eric Hoffman">Eric Hoffman</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-13</li>
<li>英文原文：<a href="http://sixrevisions.com/tutorials/web-development-tutorials/psdhtml-conversion-elegant-and-simple-css3-web-layout/">PSD/HTML Conversion: Elegant and Simple CSS3 Web Layout</a></li>
</ul>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-21_elegant_css3_layout_ld_img.jpg" width="550" height="250" /></div>
<p><em>这是系列教程的第二部分。<a href="http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/">第一部分</a>设计了一个简洁优雅的部落格设计。在开始这个教程之前你可以先看看第一部分以获得更大收获。</em></p>
<p><span id="more-3987"></span></p>
<h4>《简洁优雅的部落格网页布局教程》系列</h4>
<p>这篇教程是一个系列的第二集。这个部分(<strong>第二集</strong>)展示了如何利用第一集中建立的PSD设计制作一个HTML/CSS网页模板。</p>
<ul>
<li><strong>第一集：</strong><a href="http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/">使用Photoshop建立一个简洁优雅的部落格网页布局</a></li>
<li><strong>第二集：</strong><a href="http://sheneyan.com/blog/2010/10/psdhtml-conversion-elegant-and-simple-css3-web-layout/">PSD/HTML转换：简洁优雅的CSS3网页布局</a></li>
</ul>
<h4>最终成果</h4>
<p>单击下面的最终成果预览图来查看<a href="http://demos.sixrevisions.com/2010/08/27/index.html">在线演示</a>。因为我们使用了部分CSS3，该示例在所有浏览器上看起来不会完全一致。</p>
<div><a href="http://demos.sixrevisions.com/2010/08/27/index.html"><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-22_final_result_preview.jpg" width="550" height="313" alt="Final Result" /></a></div>
<p><a class="more-link" href="http://demos.sixrevisions.com/2010/08/27/index.html">查看示例</a></p>
<h4>创建基础文件</h4>
<p><span class="tutorial-number">1</span>我们要做的第一件事就是建立文件和文件夹。在你的计算机上建立一个新文件夹，命名为<code>letterpress</code>。这是我们的工作目录。</p>
<p><span class="tutorial-number">2</span>在文件夹<code>letterpress</code>下创建2个文件夹，命名为<code>images</code>和<code>styles</code>。</p>
<p><span class="tutorial-number">3</span>打开你最喜欢的HTML/CSS编辑器(如Dreamweaver或Notepad++)并创建一个HTML文档。命名为<code>index.html</code>或别的什么适合的名称。将这个HTML文档保存在文件夹<code>letterpress</code>下。</p>
<p><span class="tutorial-number">4</span>创建一个样式文档并命名为<code>style.css</code>（或其他的名称）。保存至<code>styles</code>文件夹下。</p>
<h4>基本HTML</h4>
<p><span class="tutorial-number">5</span>下面的代码来自于<code>index.html</code>。使用了常用的HTML标记。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Letterpress<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content-type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=ISO-8859-1&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;style.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<h4>PSD切片</h4>
<p><span class="tutorial-number">6</span>现在打开Photoshop并打开我们之前依照教程的<a href="http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop">第一部分</a>制作的PSD文档。</p>
<p><span class="tutorial-number">7</span>除了下列图层外其他全部隐藏：</p>
<ul>
<li>Datebg 和 shadow</li>
<li>Headerdivider</li>
<li>Navbarbg</li>
<li>Logo</li>
<li>Sidebar</li>
<li>Sidebar divider</li>
<li>Background</li>
<li>Widgetbg</li>
<li>Footerbg</li>
<li>Image</li>
<li>imagebg</li>
</ul>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-01_hide_layers.jpg" width="548" height="796" alt="PSD切片" /></div>
<p><span class="tutorial-number">8</span>使用矩形选框工具(M)选中代表活动页的书签。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-02_select_bookmark.jpg" width="549" height="388" alt="PSD切片" /></div>
<p><span class="tutorial-number">9</span>复制选中部分并执行 编辑 &gt; 合并拷贝(Ctrl/Cmd + Shift + C)。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-03_edit_copy_merged.jpg" width="549" height="514" alt="PSD切片" /></div>
<p><span class="tutorial-number">10</span>打开一个新的Photoshop文档(Ctrl/Cmd + N)；不要修改画板大小，因为它自动匹配在你剪贴板中内容的尺寸（在这个例子中，是那个书签。）</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-04_copy_paste_newdoc.jpg" width="549" height="338" alt="Slice the PSD " /></div>
<p><span class="tutorial-number">11</span>单击 Ctrl/Cmd + V (编辑 &gt; 黏贴 的键盘快捷键)将复制内容黏贴到新的Photoshop文档中。</p>
<p><span class="tutorial-number">12</span>选择 文件 &gt; 存储为Web和设备所用格式，将新文档以JPG格式存储至<code>images</code>文件夹。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-05_save_for_web.jpg" width="549" height="657" alt="PSD切片 " /></div>
<h4>撰写HTML标记</h4>
<p>我通常会先实现HTML（包括class和id），然后才写CSS来设置站点样式。这样我就不必前后来回切换，可以保证我的工作顺畅进行。我们先给我们的设计中不同的部分编码，然后再来设置它们的样式。</p>
<h4>容器</h4>
<p><span class="tutorial-number">13</span>创建一个id为<code>container</code>的div；它会用于容纳除了页脚之外的所有元素。通过这种方法我们可以在接下来的时候很容易地将其置为居中。</p>
<p><span class="tutorial-number">14</span>为logo创建一个div并将网站的logo图片插入其中。你可以用我们之前讨论过的相同的方式从PSD样板中将LOGO切出来，或插入你自己的LOGO(推荐)。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- CONTAINER --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;container&quot;</span>&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- LOGO --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/logo.jpg&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;348&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;60&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;logo&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-06_logo.jpg" width="550" height="189" alt="PSD切片 " /></div>
<h4>导航栏</h4>
<p><span class="tutorial-number">15</span>接下来，我们创建导航栏。使用一个无序号列表，将每个导航栏链接加为列表项。 给第一个列表项设置id<code>firstlink</code>，顺便给当前链接加上一个背景图(从PSD中切出的书签)。还要加上分割线。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- NAVIGATION BAR --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;navigationbar&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;firstlink&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Home<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>About<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Archives<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Contact<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dividerheader&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p class="notes">子乌注：完全没必要使用一个独立div来放分割线，设置navigationbar的背景即可，下同。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-07_unordered_list_main_nav.jpg" width="550" height="249" alt="导航栏" /></div>
<h4>侧边栏</h4>
<p><span class="tutorial-number">16</span>创建新的div，设置id=<code>sidebar</code>。</p>
<p><span class="tutorial-number">17</span>插入一个表单，带有元素<code>input type=&quot;text&quot;</code>。</p>
<p><span class="tutorial-number">18</span>改变文本框元素的默认值为<code>Search</code>，<code>size</code>属性设为 29 (29个字符)，给它绑定一个Javascript事件监听器，这样当文本框元素获得焦点或失去焦点时，会触发函数<code>clearText()</code>。</p>
<p><strong>注:</strong>强烈建议<strong>静悄悄地写javascript</strong>。因为我们在这个教程中的重点不是JavaScript，我决定在行内实现函数。<em>请使用不引人注目的JavaScript</em>(<span class="notes">子乌注：不太明白作者的意思……</span>)。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;">onFocus=&quot;clearText(this)&quot; onBlur=&quot;clearText(this);&quot;</pre></div></div>

<p>这就是在搜索文本框中隐藏或显示“Search”文本的函数内容。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
function clearText(field)
{
  if (field.defaultValue == field.value) field.value = '';
  else if (field.value == '') field.value = field.defaultValue;
}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>下面是我们关于侧边栏和搜索表单的HTML标记。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- SIDEBAR --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sidecolumn&quot;</span>&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- SEARCH --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;searchform&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Search&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;29&quot;</span> <span style="color: #000066;">onFocus</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clearText(this)&quot;</span> <span style="color: #000066;">onBlur</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clearText(this)&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dividersidebar&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-08_searchbar.jpg" width="550" height="291" alt="侧边栏" /></div>
<h4>最近文章和最新回复</h4>
<p><span class="tutorial-number">19</span>创建两个div；设置id为<code>recentposts</code>和<code>latestcomments</code>。</p>
<p><span class="tutorial-number">20</span>在他们之间加入一个分割线。输入一些示例内容包括添加标题和段落元素。双箭头引用(&raquo;)的HTML字符编码为<code>&amp;#187;</code>。你可以在这看到一个完整的html字符编码表：<a href="http://www.zytrax.com/tech/web/entities.html" title="html entities and codings - www.zytrax.com">here</a>. 我使用<code>&lt;li&gt;</code>标签来区分每个回复/文章名，待会再设置他们的样式。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- recent posts --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recentposts&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>recent posts<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span><span style="color: #ddbb00;">&amp;#187;</span> lorem ipsum post<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span><span style="color: #ddbb00;">&amp;#187;</span> another post<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span><span style="color: #ddbb00;">&amp;#187;</span> i'm just writing things<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dividersidebar&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- latest comments --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;latestcomments&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>latest comments<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span><span style="color: #ddbb00;">&amp;#187;</span> &quot;blah blah blah...&quot;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span><span style="color: #ddbb00;">&amp;#187;</span> &quot;blah blah blah...&quot;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span><span style="color: #ddbb00;">&amp;#187;</span> &quot;blah blah blah...&quot;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-09_recentlatest_comments.jpg" width="550" height="596" alt="最近文章和最新回复" /></div>
<h4>侧边栏网页横幅</h4>
<p>现在每个部落格都有广告区域，我们为什么不放呢？</p>
<p><span class="tutorial-number">21</span>在div <code>#sidebar</code>，添加另一个容纳所有网页横幅的div。</p>
<p><span class="tutorial-number">22</span>前两个网页横幅需要设置id <code>adrightfirst</code> (右边的)和 <code>adleftfirst</code> (左边的)。因为我们的空间只够在一行放两个广告，你必须给每行加个换行。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- advertising --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;adrightfirst&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;adleftfirst&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;adright&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;adleft&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;adright&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;adleft&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;adright&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;adleft&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- end of sidebar --&gt;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-10_ads_html.jpg" width="549" height="1137" alt="侧边栏网页横幅" /></div>
<h4>文章</h4>
<p>回到部落格文章的标记部分。</p>
<p><span class="tutorial-number">23</span>创建三个div：<code>date1</code>、<code>datetext1</code>和<code>post1</code>。</p>
<p><span class="tutorial-number">24</span>添加日期(日期使用<code>&lt;h1&gt;</code>，月份使用<code>&lt;p&gt;</code>)，标题(使用<code>&lt;h1&gt;</code>)，文章元数据(使用<code>&lt;h2&gt;</code>)还有一些内容(使用<code>&lt;p&gt;</code>)。</p>
<p class="notes">子乌注：从语义的角度上来讲，日期使用h1、文章标题使用h1都是有问题的，因为在一个页面中应该只有唯一一个顶级标题，建议用字体大小来设定日期的格式，而文章标题使用h2级别的标题来标明——它应该是除了部落格名称之外级别第二高的标题（可多个），另外，div不该用id来标识，这样问题很多，应该直接用class来标识，前面的广告部分也存在类似的问题。</p>
<p><span class="tutorial-number">25</span>复制整个文章div，黏贴到下面(创建另一篇部落格文章条目)。在两篇文章间插入分割线。别忘了修改数字(<code>date1</code> 改为 <code>date2</code>)。</p>
<p class="notes">子乌注：前面已经说过了，这样做的话没太大意义，除非要针对文章进行脚本处理或别的操作，别设置无意义的id！</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- date one --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;date1&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;datetext&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>13<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>apr<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- post one --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post1&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>i enjoy reading six revisions<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>by eric hoffman <span style="color: #ddbb00;">&amp;nbsp;&amp;middot;&amp;nbsp;</span> 1223 comments <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>
&nbsp;
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/snowboard.jpg&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;snowboard&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;margin: 5px 0px 5px 0px&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span> &quot;lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot;lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">i</span>&gt;</span>continue reading... <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">i</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;dividerpost&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- date two --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;date2&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;datetext&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>12<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>apr<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- post two --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post2&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>who likes obama?<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>by george bush <span style="color: #ddbb00;">&amp;nbsp;&amp;middot;&amp;nbsp;</span> 0 comments <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>
&nbsp;
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/snowboard.jpg&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;snowboard&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;margin: 5px 0px 5px 0px&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span> &quot;lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot;lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">i</span>&gt;</span>continue reading... <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">i</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- end of container --&gt;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-11_posts_html.jpg" width="549" height="1635" alt="文章" /></div>
<h4>页脚部件</h4>
<p><span class="tutorial-number">26</span>创建div，id=<code>footerwidgets</code>。在其内部放置一个新的div，id=<code>footerwidgettext</code>。插入三个不同id的div。例如 <code>footerwidgettextfirst</code>, <code>footerwidgettextmiddle</code>,依此类推。使用不同的id以使得可以设置不同的margin，所以我们不使用class。</p>
<p class="notes">子乌注：设置不同的margin不是不使用class的原因……不过这里影响不太大。另外，id的命名真的很烂，我知道你是示例，那也不该这么写啊……</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- FOOTERWIDGETS --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footerwidget&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footerwidgettext&quot;</span>&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!-- WIDGET ONE --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footerwidgettextfirst&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Widget title <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Karl Aloys zu Fürstenberg (1760-1799) was a soldier in the Austrian service. He achieved the rank of Field Marshal, and died at the Battle of Stockach. The third son of a cadet branch of the Fürstenberg, at his birth his chances of inheriting the family title of Fürst zu Fürstenberg ...<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- WIDGET TWO --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footerwidgettextmiddle&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Widget title <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Karl Aloys zu Fürstenberg (1760-1799) was a soldier in the Austrian service. He achieved the rank of Field Marshal, and died at the Battle of Stockach. The third son of a cadet branch of the Fürstenberg, at his birth his chances of inheriting the family title of Fürst zu Fürstenberg ...<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- WIDGET THREE --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footerwidgettextlast&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Widget title <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Karl Aloys zu Fürstenberg (1760-1799) was a soldier in the Austrian service. He achieved the rank of Field Marshal, and died at the Battle of Stockach. The third son of a cadet branch of the Fürstenberg, at his birth his chances of inheriting the family title of Fürst zu Fürstenberg ...<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- END OF FOOTER WIDGETS --&gt;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-12_footer_widgets.jpg" width="549" height="526" alt="页脚部件" /></div>
<h4>页脚</h4>
<p>我们接下来做个简单的页脚节点。</p>
<p><span class="tutorial-number">27</span>和div<code>#footerwidgets</code>一样，div<code>#footer</code>设为100%宽度，不过文本将和其余内容对齐(居中)。这就是我们为什么要在其中创建另一个id=<code>footertext</code>的div。将页脚内容添加进<code>#footertext</code>。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- FOOTER --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footer&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footertext&quot;</span>&gt;</span>
<span style="color: #ddbb00;">&amp;copy;</span> 2010 Eric Hoffman. All rights reserved.
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- END OF FOOTER --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-13_html_finished.jpg" width="549" height="2235" alt="Footer" /></div>
<p>上面就是全部的标记内容，接下来是CSS。</p>
<h4>撰写CSS</h4>
<p>我们完成了HTML，现在来处理我们的样式。</p>
<p><span class="tutorial-number">28</span>首先的首先：打开开始时创建的文件<code>style.css</code>。确保你的HTML文件正确链接到这个文件。</p>
<h4>重置CSS</h4>
<p><span class="tutorial-number">29</span>首先，我们使用一个简单的CSS将我们的样式进行重置。我建议你针对CSS重置进行更进一步的阅读以充分了解它的优势；<a href="http://sixrevisions.com/css/css-tips/css-tip-1-resetting-your-styles-with-css-reset/" title="Resetting Your Styles with CSS Reset - sixrevisions.com">CSS Reset</a> 是个不错的开始。简单起见，我这里只使用了选择器 <code>*</code>。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;HTML</div><pre class="html4strict" style="font-family:monospace;">* {
  margin:0;
  padding:0;
}</pre></div></div>

<h4>Body背景和 @font-face</h4>
<p><span class="tutorial-number">30</span>下一步，改变body背景为我们PSD样板中的杂色蓝色背景。学习将其从PSD样板中切出来(我也将它放到可下在的原文件包中——<code>background.jpg</code>).</p>
<p><span class="tutorial-number">31</span>我们还使用了CSS3元素<code>text-shadow</code>。<code>0</code>是x轴偏移量，<code>1px</code>是y轴偏移量，<code>2px</code>是模糊效果而<code>#555</code>是阴影颜色。<code>@font-face</code>允许我们内嵌一个非网页安全的字体以使所有访客可以看到我们制作网页时的样子。你可以在 <a href="http://sixrevisions.com/css/font-face-guide/">The Essential Guide to @font-face</a>详细了解<code>@font-size</code>。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;CSS</div><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/background.jpg&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">2px</span> <span style="color: #cc00cc;">#555</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
&amp;<span style="color: #cc00cc;">#64</span><span style="color: #00AA00;">;</span>font-face <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Museo Slab 500&quot;</span><span style="color: #00AA00;">;</span>
  src<span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;http://hatchergraphics.com/MuseoSlab-500.otf&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<h4>包装/导航</h4>
<p><span class="tutorial-number">32</span>我们现在创建一个容器作为包装以使我们可以轻易地将我们的设计居中。我喜欢制作精确到像素的设计，所以我选择了固定宽度布局。如果你想看看其他布局样式，你可以看看<a href="http://sixrevisions.com/web_design/a-guide-on-layout-types-in-web-design/">A Guide on Layout Types in Web Design</a>。为了居中容器，只要使用<code>margin: 0 auto;</code> (<span class="notes">子乌注：删掉了一个ad XD</span>)。</p>
<p><span class="tutorial-number">33</span>给导航栏设置样式。<code>#firstlink</code>是当前链接。如果你想扩展设计并添加所有的四个页面，你必须修改列表的id。例如，如果我现在在“About”页面，列表项About必须有id<code>firstlink</code>。为了居中背景图，使用 <code>background-position: center;</code>。</p>
<p class="notes">子乌注：嗯……用class的话更利于语义，因为id不应该随意变更……</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;CSS</div><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1000px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">890px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#navigationbar</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">50px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">80px</span> <span style="color: #933;">390px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">650px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#navigationbar</span> ul li <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Museo Slab 500&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#navigationbar</span> ul li a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">74px</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#navigationbar</span> ul li a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#DBDBDB</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#firstlink</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/linkbg.jpg&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">74px</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-14_background_navigation.jpg" width="550" height="579" alt="包装/导航" /></div>
<h4>Logo/分割线</h4>
<p><span class="tutorial-number">34</span>Logo的高度和宽度取决于你的网站名称。我们的“Letterpress”字体为65pt(Photoshop中)，高度60px而宽度为348px。</p>
<p><span class="tutorial-number">35</span>接下来设置分割线的样式。你可以使用2px高的空白div、span或者设置你的标题的样式以让其有2px高的底部边框。我使用了和文章分割线一样的背景图。</p>
<p class="notes">前面提到过了，完全没必要使用独立div来做分割线，无意义的元素，无意义的流量消耗。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;CSS</div><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#logo</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">348px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#dividerheader</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/dividerpost.jpg&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">890px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-15_1px_divider.jpg" width="549" height="214" alt="Logo/分割线" /></div>
<h4>侧边栏</h4>
<p><span class="tutorial-number">36</span>下一步，设置侧边栏的样式。因为部落格div会有500px宽，而我喜欢在文章和侧边栏之间有些留白，我设定侧边栏的宽度为250px。</p>
<p><span class="tutorial-number">37</span>设置分割线的样式，<code>recentposts</code>和<code>latestcomments</code>以及搜索栏。这里我们会使用另一个CSS3属性：<code>border-radius</code>。这意味着我们可以只使用CSS创建圆角边角。不幸的是这个功能并不被所有浏览器支持，所以它不会在所有浏览器下看着都圆圆的(例如IE8及以下版本)。</p>
<p><span class="tutorial-number">38</span>给所有的广告元素设置样式以确保算数正确(他们的宽度加起来不能超过250px)。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;CSS</div><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#sidecolumn</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#2c7c88</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#116678</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">240px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">25px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">250px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#dividersidebar</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/dividersidebar.jpg&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">25px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#recentposts</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#latestcomments</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">25px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
  word-wrap<span style="color: #3333ff;">:break-</span>word<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#recentposts</span> ul a<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#latestcomments</span> ul a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Trebuchet MS&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">13px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">22px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#searchform</span> <span style="color: #00AA00;">&#123;</span>
  -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Trebuchet MS&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">13px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">25px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#adrightfirst</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-1px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">31px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#adleftfirst</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">-1px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">31px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#adright</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">-1px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#adleft</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">-1px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#adright</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#adleft</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#adrightfirst</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#adleftfirst</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#f6f6f6</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#e7e7e7</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">117px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">117px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#adright</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#adleft</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#adrightfirst</span><span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#adleftfirst</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#e7e7e7</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#dbdbdb</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-16_sidebar_partly_styled.jpg" width="549" height="1092" alt="侧边栏" /></div>
<h4>文章</h4>
<p><span class="tutorial-number">39</span>再下来：文章。我们将创建2个文章div：一个叫做<code>post1</code>另一个叫做<code>post2</code>。</p>
<p><span class="tutorial-number">40</span>接下来我们对日期做同样的处理。如我之前提及的，两个文章div有500px宽。通过margin来定位他们，设置<code>padding-left</code>为-90px。<code>position</code>设为<code>absolute</code>。</p>
<p><span class="tutorial-number">41</span>创建另一个分割线，但这次它将和文章一样宽。</p>
<p class="notes">子乌注：从下面的css来看就明白这种情况下用id来设css是多么的傻……</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;CSS</div><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#post1</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">90px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#post2</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">525px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">20px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">90px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#dividerpost</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/dividerpost.jpg&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">16px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">495px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#date1</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/datebg.jpg&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">123px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">90px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#date2</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/datebg.jpg&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">123px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">-90px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">90px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#datetext</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">46px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">38.5px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">31px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#datetext</span> p <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Museo Slab 500&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#datetext</span> h1 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Museo Slab 500&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">35px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">22px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-17_posts.jpg" width="549" height="999" alt="Posts" /></div>
<h4>页脚部件</h4>
<p>快好了！</p>
<p><span class="tutorial-number">42</span>页脚部件：正如你在HTML那看到的，页脚和页脚部件都放在容器外，所以他们不会被我们的包装限定为890px宽。它们俩都是100%宽。</p>
<p><span class="tutorial-number">43</span>添加背景、高度(240px)，以及顶部margin。我新增了个<code>#footerwidget</code> div，一个文本div，以及其他三个放不同部件的div。给它们设置相同的样式，唯一的区别就是它们的边框和margin。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;CSS</div><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#footerwidget</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/widgetbg.jpg&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">240px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">110px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#footerwidgettext</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">240px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">890px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#footerwidgettextfirst</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">dotted</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">165px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">22px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">276px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#footerwidgettextlast</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">165px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">22px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">594px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">276px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#footerwidgettextmiddle</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">dotted</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">165px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">22px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">297px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">276px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-18_footer_widgets.jpg" width="549" height="332" alt="页脚部件" /></div>
<h4>页脚</h4>
<p><span class="tutorial-number">44</span>页脚的高度是44px。设置背景。属性<code>position</code>设置为<code>absolute</code>以使它永远在底部。类似页脚部件，我为文本创建了另一个div以让我能够让它们居中并让它和主体内容区域对齐。这里我使用了<code>margin: auto 0;</code>属性来居中它。top-margin设为10px。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;CSS</div><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/footer.jpg&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">44px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#footertext</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">44px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #993333;">auto</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">890px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-19_footer_border.jpg" width="549" height="152" alt="页脚" /></div>
<p><span class="tutorial-number">45</span>接下来的样式会应用到不同的元素上；我只是将它们放到一起而已。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;CSS</div><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#recentposts</span> h1<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#latestcomments</span> h1<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#footerwidgettextfirst</span> h1<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#footerwidgettextmiddle</span> h1<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#footerwidgettextlast</span> h1 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Georgia&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">18px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#post1</span> h1<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#post2</span> h1 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Georgia&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#post1</span> h2<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#post2</span> h2 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Trajan Pro&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">18px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#post1</span> p<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#post2</span> p <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Trebuchet MS&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">13px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">22px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#post1</span> a<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#post2</span> a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#post1</span> a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#post2</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">dotted</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#footerwidgettextfirst</span> p<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#footerwidgettextmiddle</span> p<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#footerwidgettextlast</span> p<span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#footertext</span> p <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Trebuchet MS&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">13px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/04-20_finished.jpg" width="549" height="1453" alt="Footer" /></div>
<h4>完成了！</h4>
<p>我希望你喜欢这部教程。请在下面提出你的问题和想法。</p>
<p><a class="more-link" href="http://demos.sixrevisions.com/2010/08/27/elegant-css3-weblayout.zip">下载源文件</a></p>
<h4>《简洁优雅的部落格网页布局教程》系列</h4>
<p>这篇教程是一个系列的第二集。这个部分(<strong>第二集</strong>)展示了如何利用第一集中建立的PSD设计制作一个HTML/CSS网页模板。</p>
<ul>
<li><strong>第一集：</strong><a href="http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/">使用Photoshop建立一个简洁优雅的部落格网页布局</a></li>
<li><strong>第二集：</strong><a href="http://sheneyan.com/blog/2010/10/psdhtml-conversion-elegant-and-simple-css3-web-layout/">PSD/HTML转换：简洁优雅的CSS3网页布局</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/10/psdhtml-conversion-elegant-and-simple-css3-web-layout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>使用Photoshop建立一个简洁优雅的部落格网页布局</title>
		<link>http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/</link>
		<comments>http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 02:00:05 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[翻译]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[布局]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[网站设计]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1420</guid>
		<description><![CDATA[<ul>
<li>作者： <a href="http://twitter.com/hatchergraphics" title="Eric Hoffman">Eric Hoffman</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-13</li>
<li>英文原文：<a href="http://sixrevisions.com/tutorials/photoshop-tutorials/make-an-elegant-and-simple-blog-web-layout-using-photoshop/">Make an Elegant and Simple Blog Web Layout Using Photoshop</a></li>
</ul>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-01_simple_elegant_photoshop_ld_img.jpg" width="550" height="250" alt="使用Photoshop建立一个简洁优雅的部落格网页布局" /></div>
<p><em>这篇网页设计教程会为你展示制作一个干净简单的部落格布局的PSD模板的过程。我们会制作这个部落格的首页设计。而教程的第二部分会引导你将PSD转换成HTML/CSS。</em></p>
<h4>《简洁优雅的部落格网页布局教程》系列</h4>
<p>这篇教程是一个系列的第一集。这部分(<strong>第一集</strong>)展示如何在Photoshop中制作模板，而在下一个教程(<strong>第二集</strong>)里你会看到如何利用这个PSD设计来制作HTML/CSS网页模板[......]</p><p class='read-more'><a href='http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<ul>
<li>作者： <a href="http://twitter.com/hatchergraphics" title="Eric Hoffman">Eric Hoffman</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-13</li>
<li>英文原文：<a href="http://sixrevisions.com/tutorials/photoshop-tutorials/make-an-elegant-and-simple-blog-web-layout-using-photoshop/">Make an Elegant and Simple Blog Web Layout Using Photoshop</a></li>
</ul>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-01_simple_elegant_photoshop_ld_img.jpg" width="550" height="250" alt="使用Photoshop建立一个简洁优雅的部落格网页布局" /></div>
<p><em>这篇网页设计教程会为你展示制作一个干净简单的部落格布局的PSD模板的过程。我们会制作这个部落格的首页设计。而教程的第二部分会引导你将PSD转换成HTML/CSS。</em></p>
<h4>《简洁优雅的部落格网页布局教程》系列</h4>
<p>这篇教程是一个系列的第一集。这部分(<strong>第一集</strong>)展示如何在Photoshop中制作模板，而在下一个教程(<strong>第二集</strong>)里你会看到如何利用这个PSD设计来制作HTML/CSS网页模板。</p>
<ul>
<li><strong>第一集：</strong><a href="http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/">使用Photoshop建立一个简洁优雅的部落格网页布局</a></li>
<li><strong>第二集：</strong><a href="http://sheneyan.com/blog/2010/10/psdhtml-conversion-elegant-and-simple-css3-web-layout/">PSD/HTML转换：简洁优雅的CSS3网页布局</a></li>
</ul>
<h4>最终成果</h4>
<p>点击下图可看到完整大小的工作成果。</p>
<p><a href="http://sheneyan.com/blog/wp-content/uploads/2010/10/final_result.jpg" rel="shadowbox[sbpost-1420];player=img;"></p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/final_result-657x1024.jpg" alt="" title="final_result" width="500" class="alignnone size-large wp-image-1421" /></div>
<p></a></p>
<h4>创建一个新的PSD文件</h4>
<p><span class="tutorial-number">1</span>让我们直接开始吧。首先，打开Adobe Photoshop(废话)。我使用的是CS4，但其他CS版本也能做得很好。先创建一个新文档(Ctrl/Cmd + N)；设置文档大小为<strong>1046</strong>&#215;<strong>1630</strong> px，<strong>白色</strong>背景。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-04_clean_elegant_webdesign.png" width="550" height="339" alt="创建一个新的PSD文件" /></div>
<h4>制作背景</h4>
<p><span class="tutorial-number">2</span>你的新PSD的背景图层应该是被锁定且无法编辑；我们需要为此做一些事。双击图层面板上的背景图层缩略图；会弹出一个新的图层对话窗口，点击OK按钮以使该图层可编辑。</p>
<p><span class="tutorial-number">3</span>现在按住Ctrl(或Cmd键)单击图层面板上的背景图层缩略图(默认情况下Photoshop会将其更名为Layer 0)以在画板周围放置一个选择框。</p>
<p><span class="tutorial-number">4</span>在工具面板中设置背景色为蓝色(<strong>#45a0ac</strong>)并使用快捷键Ctrl/Cmd+Backspace，让选中的部分填充上该背景色。</p>
<p><span class="tutorial-number">5</span>你的背景色现在应该已经设置为暗影蓝。确保背景图层仍被选中的情况下选择菜单<strong>滤镜 > 杂色 > 添加杂色</strong>。将数量改为2%并应用滤镜。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-05_clean_elegant_webdesign.jpg" width="550" height="290" alt="制作背景" /></div>
<h4>设置一些Photoshop初始参考线</h4>
<p><span class="tutorial-number">6</span> 为了方便我们的作品对齐，设置三条垂直参考线(视图 > 新参考线)在这几个位置：<strong>60.5px</strong>，<strong>505px</strong> 和 <strong>955px</strong>。</p>
<p><strong>技巧</strong>：使用快捷键Ctrl/Cmd + ; 来切换你的Photoshop参考线是否可见。</p>
<p><span class="tutorial-number">7</span>在<strong>40px</strong>处也设置一条水平参考线。</p>
<h4>添加部落格名称</h4>
<p><span class="tutorial-number">8</span>选择工具面板上的横排文字工具(T)，然后在左上角输入你的部落格名称。在这里，我使用字体<a href="http://www.fontsquirrel.com/fonts/Museo-Slab">Museo Slab 500</a>，字体大小65pt。字体颜色设置成了暗灰(<strong>#252525</strong>)，与我们暗蓝色的背景形成不错且有些微妙的对比。顺便说一下，当你选中横排文字工具后，你可以在选项栏中设置所有这些类型的选项。</p>
<p><span class="tutorial-number">9</span>在位于图层面板的你部落格名称的文本图层上双击鼠标，弹出图层样式对话框窗口。勾选投影和内投影样式以让文本有活版/插图排版效果。</p>
<p>修改投影的颜色为亮蓝(<strong>#3f9cb0</strong>)，混合模式为<strong>屏幕</strong>(<span class="notes">我猜是第一个“正常”，不过不是很确定</span>)，并把距离和大小设置为<strong>1px</strong>。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-06_clean_elegant_webdesign.png" width="550" height="453" alt="添加部落格名称" /></div>
<p>修改内投影的距离和大小为<strong>2px</strong>。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-07_clean_elegant_webdesign.png" width="550" height="444" alt="添加部落格名称" /></div>
<p><span class="tutorial-number">10</span>使用移动工具(V)将文本对齐到刚才设置的参考线以定位文本。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-08_clean_elegant_webdesign.jpg" width="550" height="127" alt="添加部落格名称" /></div>
<h4>添加主页导航菜单链接</h4>
<p><span class="tutorial-number">11</span>再次使用横排文字工具，使用和刚才相同的字体创建四个(独立的)导航栏链接，字体大小缩小为<strong>20pt</strong>。将他们写在不同的图层里。在这个教程中，菜单项分别为“Home”，“About”，“Archives”和“Contact”。</p>
<p><span class="tutorial-number">12</span>将第四个导航栏链接(“Contace”)对齐到参考线最右端，而第一个导航栏链接与部落格名称右侧的参考线对齐。其他两个链接在他们之间。</p>
<p><span class="tutorial-number">13</span>为了将他们对齐，在图层面板中选中这四个图层，然后选择<strong>图层 > 对齐 > 垂直</strong>。</p>
<p><span class="tutorial-number">14</span>为了保证导航栏链接之间有相同的空白，在图层面板上选中这四个图层，然后选择<strong>图层 > 分布 > 水平居中</strong>。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-09_clean_elegant_webdesign.jpg" width="550" height="78" alt="添加首页导航栏链接" /></div>
<p><span class="tutorial-number">15</span>在<strong>88px</strong>处添加一条水平参考线(视图 > 新参考线)，使用移动工具(V)将这些链接放置于参考线之上。</p>
<h4>制作活动导航菜单链接背景</h4>
<p><span class="tutorial-number">16</span>我们将用不同的背景色、字体颜色和阴影来高亮用户所在的页面。背景将会饰以类似“书签”的阴影(赋予我们布局一些视觉上的语义)。我会向你展示如何制作这个“书签”阴影。首先，创建一个新图层(将其命名为“linkbg”)。从工具面板中选中矩形选框工具(M)。在这个矩形选框工具的选项栏中，将样式选项改为<strong>固定大小</strong>并设置宽度选项为<strong>100px</strong>，高度选项为<strong>148px</strong>。将你的矩形选框置于画板上我们导航菜单栏周围。</p>
<p><span class="tutorial-number">17</span>改变背景色为我们的暗灰(<strong>#252525</strong>)，点击Ctrl/Cmd + Backspace 填充矩形阴影。</p>
<p><span class="tutorial-number">18</span>现在选中自定义形状工具(U)并在选项栏中设置形状选项为<strong>Arrow 2</strong>(是Photoshop于封装的自定义形状，<span class="notes">子乌注：不知道是不是我用的版本是简化版，没找到Arrow 2，我用Arrow 9代替</span>)。</p>
<p><span class="tutorial-number">19</span>使用自定义形状工具在你的画板上画这个箭头，然后在图层面板上选中它所在的图层，将其旋转以朝上 (<strong>编辑 > 变换 > 旋转90<sup>o</sup> 逆时针</strong>).</p>
<p><span class="tutorial-number">20</span>右键单击箭头图层，选择 栅格化图层 将其转换成普通图层。</p>
<p><span class="tutorial-number">21</span>在图层面板上修改图层的顺序以确保箭头图层在灰色“linkbg”层之上。</p>
<p><span class="tutorial-number">22</span>在图层面板上选中箭头图层和“linkbg”层，选择<strong>图层 > 对齐 > 水平居中</strong>。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-10_clean_elegant_webdesign.jpg" width="550" height="216" alt="制作活动导航菜单链接背景" /></div>
<p><span class="tutorial-number">23</span>Ctrl/Cmd + 单击图层面板的箭头图层缩略图以选中该图层，切换到“linkbg”图层，单击backspace或delete删除箭头图层下的区域。</p>
<p>做完之后，你不再需要这个箭头图层啦，干掉他就是了。</p>
<p><span class="tutorial-number">24</span>现在你的活动导航菜单连接已经有了一个看着像书签的背景。通过应用内发光、颜色叠加和描边来设计这个图层以匹配我们logo的观感。</p>
<p>内发光颜色设为暗灰 (<strong>#2e2d2d</strong>).</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-11_clean_elegant_webdesign.png" width="550" height="454" alt="制作活动导航菜单连接背景" /></div>
<p>颜色叠加再次使用我们的暗灰 (<strong>#252525</strong>)。你并不一定需要这个图层样式，因为之前我们已经使用了这个颜色填充图层。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-12_clean_elegant_webdesign.png" width="549" height="451" alt="制作活动导航菜单链接背景" /></div>
<p>描边颜色设为黑色 (<strong>#000000</strong>).</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-13_clean_elegant_webdesign.png" width="550" height="445" alt="制作活动导航菜单链接背景" /></div>
<p>现在我们的“书签”活动链接指示看起来应该像这样：</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-14_clean_elegant_webdesign.jpg" width="550" height="293" alt="制作活动导航菜单链接背景" /></div>
<h4>设定导航菜单链接的样式和位置</h4>
<p><span class="tutorial-number">25</span>现在该给我们的菜单栏链接设置一些样式。首先，添加一个投影样式到其他三个非激活连接上(“About”、“Archives”和“Contact”)。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-15_clean_elegant_webdesign.png" width="550" height="450" alt="设定导航菜单链接的样式和位置" /></div>
<p><span class="tutorial-number">26</span>下一步，使用横排文字工具(T)改变第一个链接(“Home”)的文本颜色为白色。</p>
<p><span class="tutorial-number">27</span>使用 <strong>图层 > 对齐 > 水平居中</strong>来水平对齐第一个链接和书签形状。我在“Home”文本下加了个在Adobe Illustrator下制作的小小的波浪矢量形状，不过可以不管它。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-16_clean_elegant_webdesign.jpg" width="550" height="179" alt="设定导航菜单链接的样式和位置" /></div>
<h4>制作水平内陷分隔线</h4>
<p><span class="tutorial-number">28</span>在<strong>160px</strong>处添加另一条水平参考线。</p>
<p><span class="tutorial-number">29</span>选中矩形选框工具(M)并创建一个 <strong>890&#215;1px</strong> 大小的瘦长选框。</p>
<p><span class="tutorial-number">30</span>添加新的图层(命名为“dividertop”)，在这个新图层上，单击Ctrl/Cmd+Backspace用任意颜色填充刚才的矩形。</p>
<p><span class="tutorial-number">31</span>给“dividertop”图层应用一个颜色叠加图层样式以使该矩形的颜色比我们的暗蓝背景颜色稍亮(<strong>#2c7c88</strong>)。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-17_clean_elegant_webdesign.png" width="550" height="452" alt="制作水平内陷分隔线" /></div>
<p><span class="tutorial-number">32</span>使用移动工具(V)将这个矩形与参考线左对齐和上对齐。</p>
<p><span class="tutorial-number">33</span>复制图层并将它向原有矩形的右下方移动。重命名图层为“dividerbottom”。</p>
<p><span class="tutorial-number">34</span>给它设置一个亮蓝颜色叠加图层样式(<strong>#4fbaca</strong>)。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-18_clean_elegant_webdesign.png" width="550" height="453" alt="制作水平内陷分隔线" /></div>
<p>在图层面板中同时选中“dividertop”和“dividerbottom”图层来链接它们——右键单击它们其中一个，从右键菜单中选择链接图层。这样当我们需要移动它们的时候它们会一起移动。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-19_clean_elegant_webdesign.png" width="550" height="88" alt="自作水平内陷分隔线" /></div>
<h4>设计发布日期背景</h4>
<p><span class="tutorial-number">35</span>我们现在完成了布局的头部区域。接下来是主体内容部分，先是第一个部落格文章条目的日期。再首先：我们需要在<strong>210px</strong>处添加另一条水平参考线。</p>
<p><span class="tutorial-number">36</span>在工具面板中选中圆角矩形工具(U)，在它的选项栏中，改变半径为<strong>10cm</strong>。</p>
<p><span class="tutorial-number">37</span>使用那个圆角矩形工具创建一个<strong>75&#215;150px</strong>大小的圆角矩形。</p>
<p><span class="tutorial-number">38</span>给刚才的圆角矩形图层应用一个内阴影样式——设置内阴影的颜色为蓝色(<strong>#3793a0</strong>)。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-20_clean_elegant_webdesign.png" width="550" height="457" alt="设计发布日期背景" /></div>
<p><span class="tutorial-number">39</span>应用一个比内阴影更深的蓝色叠加图层样式(<strong>#2c788</strong>).</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-21_clean_elegant_webdesign.png" width="550" height="451" alt="设计发布日期背景设计发布日期背景" /></div>
<p><span class="tutorial-number">40</span>给这个形状应用一个描边图层样式——使用比内阴影更深的蓝色线条颜色(<strong>#1a5a64</strong>)。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-22_clean_elegant_webdesign.png" width="550" height="455" alt="设计发布日期背景" /></div>
<p><span class="tutorial-number">41</span>将这个图层重名为“datebg”(意即“日期背景”)以使你的作品有组织，接着栅格化这个图层(右键单击，选择栅格化图层)。</p>
<p><span class="tutorial-number">42</span>使用矩形选框工具，选中形状右边部分的1/3，删除选中区域。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-23_clean_elegant_webdesign.jpg" width="550" height="210" alt="设计发布日期背景" /></div>
<p><span class="tutorial-number">43</span>还是在图层“datebg”，通过<strong>滤镜 > 杂色 > 添加杂色</strong>添加一个杂色滤镜，数量选项设置为<strong>2%</strong>。</p>
<h4>制作发布日期的垂直阴影</h4>
<p><span class="tutorial-number">44</span>现在给日期背景的阴影创建一个新图层。使用椭圆选框工具(M)，做一个大约<strong>17px</strong>宽<strong>100px</strong>高的椭圆形；最精确的方式是使用椭圆选框工具样式选项里的<strong>固定大小</strong>并输入宽和高的维度。</p>
<p><span class="tutorial-number">45</span>将这个选框置于日期背景的右端。使用黑色(<strong>#000000</strong>)填充选框(Shift+F5)并将图层命名为“shadow”。</p>
<p><span class="tutorial-number">46</span>在“shadow”图层上应用一个高斯模糊(滤镜 > 模糊 > 高斯模糊)，设定半径选项为<strong>3px</strong>。</p>
<p><span class="tutorial-number">47</span>使用矩形选框工具，选中该模糊椭圆阴影的右半部分，单击backspace或delete删除这半部分。</p>
<p><span class="tutorial-number">48</span>降低图层的透明度至<strong>55%</strong>，结束。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-24_clean_elegant_webdesign.jpg" width="550" height="181" alt="设计发布日期背景" /></div>
<h4>添加日期文本，文章标题，元数据</h4>
<p><span class="tutorial-number">49</span>日期背景完成后，接下来是添加部落格文章发布的日期。点击工具面板上的横排文字工具(T)，使用字体Museo Slab 500写下你的日期。数字天数的字体大小应该是<strong>42pt</strong>，而月份——位于数字天数下的一行——为<strong>20pt</strong>。我输入的是“13 APR”，APR另起一行。</p>
<p><span class="tutorial-number">50</span>使用移动工具和之前使用过的图层对齐命令对齐半椭圆阴影(图层“shadow”)、日期背景(“datebg”)和日期文本图层。</p>
<p><span class="tutorial-number">51</span>至于文章的标题，我选择Georgia系列字体，<strong>35pt</strong>大小。而元数据(作者、回复数)，我使用<strong>20pt</strong>的Trajan Pro。你可以看到我用<a href="http://www.ascii.cl/htmlcodes.htm">middle dot/Georgian comma</a>来分隔作者名与回复数——直接复制并将其黏贴到Photoshop中。另外，修改文本行高为<strong>28px</strong>。你可以在<strong>窗口 > 字符</strong>面板中修改。</p>
<p>下面是我们的日期，部落格文章标题，以及文章元数据。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-25_clean_elegant_webdesign.jpg" width="550" height="150" alt="添加日期文本，文章标题，元数据" /></div>
<p><span class="tutorial-number">52</span>在<strong>165px</strong>处添加一条垂直参考线。将你的文本与参考线和日期对齐。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-26_clean_elegant_webdesign.jpg" width="550" height="156" alt="添加日期文本，文章标题，元数据" /></div>
<h4>添加部落格文章前置图像</h4>
<p><span class="tutorial-number">53</span>使用矩形选框工具(M)，创建一个<strong>480&#215;150px </strong>矩形(高取决于你使用的图像尺寸，但针对这个模板，最大宽度为480px)。</p>
<p><span class="tutorial-number">54</span>在一个新图层上使用随便一种颜色填充你的选框，然后应用一个描边图层样式来给我们的图片加个边框。边框的颜色是暗灰(<strong>#1b1b1b</strong>)。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-27_clean_elegant_webdesign.png" width="550" height="454" alt="添加部落格文章前置图像" /></div>
<h4>添加并定位部落格文章内容</h4>
<p><span class="tutorial-number">55</span>照一张你的图片并将其黏贴到你的PSD文件中。我用了一张滑雪板的图，不过你选什么样的图片并不重要；它只是我们PSD样板中的小点缀(eye candy，华而不实的东西)。使用自由变换(Ctrl/Cmd + T)调整你图片的大小以使其恰好塞进我们的矩形框中。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-28_clean_elegant_webdesign.jpg" width="550" height="225" alt="添加并定位部落格文章内容" /></div>
<p><span class="tutorial-number">56</span>切换到横排文字工具(T)并在图片下黏贴一些文本。你可以使用类似<a href="http://www.lipsum/">这个</a>的Loerm Ipsum生成工具(<span class="notes">用于排版的常用无意义文字</span>)在一瞬间生成些文本，不过用一些网页副本来让这个样板尽可能的真实不会是个坏主意。我为文本内容选用的字体是<a href="http://www.discusgroup.co.uk/trebuchet.htm">Trebuchet MS</a>，<strong>17pt</strong>大小，并设置行高为<strong>28pt</strong>。</p>
<p><span class="tutorial-number">57</span>在图层面板中选中所有的部落格文章设计元素并以我们创建的参考线为基准对齐。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-29_clean_elegant_webdesign.jpg" width="550" height="102" alt="添加并定位部落格文章内容" /></div>
<p><span class="tutorial-number">58</span>在<strong>450px</strong>处添加一条新的水平参考线。让文本与左侧参考线和新参考线对齐。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-30_clean_elegant_webdesign.jpg" width="550" height="475" alt="添加并定位部落格文章内容" /></div>
<p><span class="tutorial-number">59</span>从图层面板中选中所有的部落格文章图层(“datebg”、“shadow”、“date”、部落格文章标题文本、元数据文本、图片背景、图片以及部落格文章文本)，试用 图层编组(Ctrl/Cmd + G)将他们一起分组，这会让所有的所有这些图层位于同一个文件夹下。命名这个图层分组为“Post 1”。</p>
<h4>在部落格文章底部加一条内陷水平分割线</h4>
<p><span class="tutorial-number">60</span>在<strong>700px</strong>处添加另一条水平参考线。复制我们刚才创建的分割线并命名该图层为“dividerpost”。</p>
<p><span class="tutorial-number">61</span>使用自由变换调整这个分割线的尺寸让它和前置图像一样宽度。接着使用移动工具(V)将其挪动到我们刚创建的水平参考线位置。</p>
<h4>添加另一篇部落格文章</h4>
<p><span class="tutorial-number">62</span>复制图层分组“Post 1”并重命名为“Post 2”。</p>
<p><span class="tutorial-number">63</span>在<strong>720px</strong>处添加新的水平参考线，将Post 2的日期框的阴影与新参考线对齐。</p>
<p><span class="tutorial-number">64</span>改变图层分组“Post 2”的元素以使它与第一篇部落格文章区分开来；比如，改掉回复数，日期，和部落格文章标题。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-31_clean_elegant_webdesign.jpg" width="550" height="589" alt="添加另一篇部落格文章" /></div>
<h4>制作侧边栏背景</h4>
<p><span class="tutorial-number">65</span>使用矩形选框工具创建一个<strong>250&#215;350px</strong>大小的矩形(在一个新图层将这个矩形选框用随便一种颜色填充，并将新矩形命名为“sidebar”)。这个矩形是我们的侧边栏背景。</p>
<p><span class="tutorial-number">66</span>让这个侧边栏与位于<strong>210px</strong>的水平参考线和我们之前创建的最右边的垂直参考线对齐。</p>
<p><span class="tutorial-number">67</span>给这个侧边栏背景设一个颜色叠加图层样式；颜色叠加的颜色设为暗蓝(<strong>#2c7c88</strong>)。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-32_clean_elegant_webdesign.png" width="550" height="450" alt="制作侧边栏背景" /></div>
<p><span class="tutorial-number">68</span>另外，给侧边栏背景也设一个描边图层样式，描边颜色更暗一些(<strong>#116678</strong>)。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-33_clean_elegant_webdesign.png" width="550" height="443" alt="制作侧边栏背景" /></div>
<p><span class="tutorial-number">69</span>在<strong>730px</strong>和<strong>930px</strong>各设置一条垂直参考线；我们利用这些参考线确保在我们的侧边栏内部有一些留白。</p>
<h4>制作搜索栏</h4>
<p><span class="tutorial-number">70</span>使用圆角矩形工具(U)从左边的垂直参考线(730px位置)画至右边的垂直参考线；这个圆角矩形大约<strong>25px</strong>高。将这个阴影图层命名为“searchbar”。给这个圆角矩形设一个白色(<strong>#ffffff</strong>)的颜色叠加图层样式。</p>
<p><span class="tutorial-number">71</span>找一个放大镜图标来充当搜索按钮(你可以使用类似<a href="http://www.iconfinder.com/">IconFinder</a>的在线工具来寻找免费图标)。</p>
<p><span class="tutorial-number">72</span>将这个图标定位在白色圆角矩形内部(在其左部)。</p>
<p><span class="tutorial-number">73</span>创建一条就像我们之前做的水平分割线。跨度从730px的垂直参考线到930px的垂直参考线。在它和搜索栏之间保留一点小小的空白。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-34_clean_elegant_webdesign.jpg" width="549" height="141" alt="制作搜索栏" /></div>
<h4>添加侧边栏文字</h4>
<p><span class="tutorial-number">74</span>现在轮到文字了。我使用横排文字工具(T)加了一个侧边栏标题(“最近文章”)——Georia字体，字体大小<strong>23pt</strong>。其下我列了最近发布的三篇部落格文章，使用字体Trebuchet MS，大小<strong>17pt</strong>，行高<strong>28pt</strong>。将这个文本图层命名为“recent posts”。</p>
<p><span class="tutorial-number">75</span>复制上面的水平分割线并将它移动到“recent posts”的底部。</p>
<p><span class="tutorial-number">76</span>创建另一个类似的文本图层，命名为“recent comments”。</p>
<p><span class="tutorial-number">77</span>将这两个文本块与左侧参考线对齐。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-35_clean_elegant_webdesign.jpg" width="550" height="356" alt="添加侧边栏文字" /></div>
<h4>设计侧边栏广告位</h4>
<p><span class="tutorial-number">78</span>使用矩形选框工具画一对<strong>118&#215;118px</strong>大小的正方形。按住shift键以确保你的方块的宽和高完全一致。</p>
<p><span class="tutorial-number">79</span>将一个方块右对齐(靠向右边参考线)而另一个左对齐(靠向左边参考线)。</p>
<p><span class="tutorial-number">80</span>使用灰色(<strong>#f6f6f6</strong>)颜色涂层叠加样式填充这两个正方形。这是给我们的部落格放置 <a href="http://sixrevisions.com/design-showcase-inspiration/banner-ads-examples/" title="Banner Ads: Excellent Examples for Inspiration - sixrevisions.com">banner广告</a>的地方。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-36_clean_elegant_webdesign.png" width="550" height="411" alt="设计侧边栏广告位" /></div>
<p><span class="tutorial-number">81</span>将这两个灰色方块复制两次或更多，这取决于你打算放几个广告。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-37_clean_elegant_webdesign.jpg" width="550" height="451" alt="设计侧边栏广告位" /></div>
<h4>侧边栏整理</h4>
<p><span class="tutorial-number">82</span>将所有的侧边栏元素图层编组并命名这个图层分组为“sidebar”以保持我们的样板整洁(如果你和一个将你的PSD转成HTML/CSS的前端工程师一起工作，他会因此爱死你的)。</p>
<h4>布局主体页脚</h4>
<p><span class="tutorial-number">83</span>新增两条新的水平参考线：一条在<strong>1220px</strong>而另一条位于<strong>1550px</strong>。</p>
<p><span class="tutorial-number">84</span>使用矩形选框工具(M)，横跨整个页面布局宽度——两条新参考线之间——画一个矩形，这就是我们的页脚呆的地方。使用暗灰(<strong>#2c7c88</strong>填充矩形。这是我们的页脚背景。</p>
<p><span class="tutorial-number">85</span>给我们的页脚背景应用一个杂色滤镜(滤镜 > 杂色 > 添加杂色)，数量设为<strong>1%</strong>。</p>
<p><span class="tutorial-number">86</span>给页脚背景应用一个黑色(<strong>#000000</strong>)内阴影图层样式。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-38_clean_elegant_webdesign.png" width="550" height="455" alt="布局主体页脚" /></div>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-39_clean_elegant_webdesign.jpg" width="550" height="340" alt="布局主体页脚" /></div>
<p><span class="tutorial-number">87</span>现在添加三个一样尺寸的文本栏，全都一样宽度。在这里，我为页脚文本的真实网页副本而从维基百科复制了一些有趣的内容。标题(“Widget title”)设为Georiga，<strong>23pt</strong>，普通文本则为Trebuchet MS，<strong>17pt</strong>。别忘了将行高改为<strong>28pt</strong>！</p>
<h4>制作主体页脚栏目分割线</h4>
<p><span class="tutorial-number">88</span>为了制作页脚文本栏目之间的白色垂直分割线，我们将使用图案(pattern)。第一部是创建一个新的PSD文件(Ctrl/Cmd + N)，宽度为<strong>1px</strong>、高度为<strong>3px</strong>。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-40_clean_elegant_webdesign.png" width="550" height="343" alt="制作主体页脚栏目分割线" /></div>
<p><span class="tutorial-number">89</span>放大到足够近以让你能看清你的作品(使用缩放工具)。</p>
<p><span class="tutorial-number">90</span>使用矩形选框工具和<strong>编辑 > 填充</strong>将第一个像素(顶端)染为黑色(<strong>#000000</strong>)。</p>
<p><span class="tutorial-number">91</span>选中整个画板(Ctrl/Cmd + A)然后选择 编辑 > 定义图案(<span class="notes">子乌注：CS4中将Define Pattern翻译为定义图案</span>)。命名你的模式，如“Vertical Dots”。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-41_clean_elegant_webdesign.png" width="550" height="169" alt="制作主体页脚栏目分割线" /></div>
<p><span class="tutorial-number">92</span>切换回我们的主要Photoshop文档。</p>
<p><span class="tutorial-number">93</span>创建垂直的矩形选框(<strong>1&#215;280px</strong>)。</p>
<p><span class="tutorial-number">94</span>添加新的图层并单击Shift + F5查看填充对话框窗口。在<strong>使用</strong>选项下拉菜单中，从列表中找到我们刚创建的图案(“Vertical Dots”)并单击OK，使用它来将我们的矩形选框填满。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-42_clean_elegant_webdesign.jpg" width="550" height="256" alt="制作主体页脚栏目分割线" /></div>
<p><span class="tutorial-number">95</span>复制这个虚线垂直分割线图层并将它们放置于三个页脚栏目之间。</p>
<p><span class="tutorial-number">96</span>将这些文本栏目进行编组，垂直对齐。</p>
<p><span class="tutorial-number">97</span>添加一个白色颜色叠加图层样式到每一个虚线垂直分割线上，让他们显示为白色。</p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/11-43_clean_elegant_webdesign.jpg" width="550" height="336" alt="制作主体页脚栏目分割线" /></div>
<h4>创建辅助页脚</h4>
<p><span class="tutorial-number">98</span>就在布局的正底部创建一个短的矩形选框，并用暗灰(<strong>#1f2024</strong>)填充。</p>
<p><span class="tutorial-number">99</span>应用杂色滤镜，数量设为<strong>1%</strong>。</p>
<p><span class="tutorial-number">100</span>输入一些文本，例如你的版权信息，使用字体Trebuchet MS，<strong>17pt</strong>。将文本与最左边的参考线水平对齐。</p>
<h4>结束！</h4>
<p>大功告成！这不是很简单吗？(<span class="notes">照着做很简单……我翻这100条翻了好久……</span>)</p>
<p><a href="http://sheneyan.com/blog/wp-content/uploads/2010/10/final_result.jpg" rel="shadowbox[sbpost-1420];player=img;"></p>
<div><img src="http://sheneyan.com/blog/wp-content/uploads/2010/10/final_result-657x1024.jpg" alt="" title="final_result" width="500" class="alignnone size-large wp-image-1421" /></div>
<p></a></p>
<h4>简洁优雅的部落格网页布局教程系列</h4>
<ul>
<li><strong>第一集：</strong><a href="http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/">使用Photoshop建立一个简洁优雅的部落格网页布局</a></li>
<li><strong>第二集：</strong><a href="http://sheneyan.com/blog/2010/10/psdhtml-conversion-elegant-and-simple-css3-web-layout/">PSD/HTML转换：简洁优雅的CSS3网页布局</a></li>
</ul>
<h4>下载源文件</h4>
<ul>
<li><a href='http://sheneyan.com/blog/wp-content/uploads/2010/10/simple_elegant_bloglayout-psd.zip'>psd文件</a> (ZIP, 1.61 MB)</li>
</ul>
<p class="notes">子乌注：以后我都会用部落格来翻译blog，还是喜欢这个台湾的译法。</p>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/10/make-an-elegant-and-simple-blog-web-layout-using-photoshop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>招聘经理希望程序员拥有的5个素质</title>
		<link>http://sheneyan.com/blog/2010/10/qualities-every-hiring-manager-wants-in-a-developer/</link>
		<comments>http://sheneyan.com/blog/2010/10/qualities-every-hiring-manager-wants-in-a-developer/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 05:33:56 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[翻译]]></category>
		<category><![CDATA[招聘]]></category>
		<category><![CDATA[程序员]]></category>
		<category><![CDATA[素质]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1267</guid>
		<description><![CDATA[<ul>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-07</li>
<li>英文原文：<a href="http://education.internet.com/articles/5-qualities-every-hiring-manager-wants-in-a-developer/">5 Qualities Every Hiring Manager Wants in a Developer</a></li>
</ul>
<p>当提及程序员的工作技能或必备素质的时候，在互联网上会看到充斥着各种各样的列表。而涉及到程序员的工作说明时，很多人并不具备那些相同的品质，怎么办？</p>
<h4>招聘理念影响程序员的必备素质</h4>
<p>从某种程度上讲，这取决于公司的招聘理念及认为哪个更有价值：开发技能还是其他无形的品质。Rob Mallery在洛杉矶的<a href="http://www.originatelabs.com/">Originate Labs, Inc.</a>（<span class="notes"><a href="http://www.originatechina.com/index.html">中文站</a></span>）任企业发展经理(Director of Corporate Develop[......]</p><p class='read-more'><a href='http://sheneyan.com/blog/2010/10/qualities-every-hiring-manager-wants-in-a-developer/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<ul>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-07</li>
<li>英文原文：<a href="http://education.internet.com/articles/5-qualities-every-hiring-manager-wants-in-a-developer/">5 Qualities Every Hiring Manager Wants in a Developer</a></li>
</ul>
<p>当提及程序员的工作技能或必备素质的时候，在互联网上会看到充斥着各种各样的列表。而涉及到程序员的工作说明时，很多人并不具备那些相同的品质，怎么办？</p>
<h4>招聘理念影响程序员的必备素质</h4>
<p>从某种程度上讲，这取决于公司的招聘理念及认为哪个更有价值：开发技能还是其他无形的品质。Rob Mallery在洛杉矶的<a href="http://www.originatelabs.com/">Originate Labs, Inc.</a>（<span class="notes"><a href="http://www.originatechina.com/index.html">中文站</a></span>）任企业发展经理(Director of Corporate Development)。Originate Labs是一家创投资源公司，其雇员是该领域中最优秀的。“我们与创业公司合作并投资我们的工程技术人才以换取股权或现金/股票。所以我们的工程师们必须达到或超过创业公司会雇佣的第一个或第二个‘建设工程师’这种类型人员的水平。所以我们的标注与那些大而‘稳’的公司不同”，Mallery解释道，“我宁可要那些拥有所有我们所期望的素质而完全没有我们所期望技能的任”。</p>
<p>在行业里许多招工启示中所缺少的是素质——而非开发技能或IT证书——负责招聘程序员的人们都同意这点。虽然名称不尽相同，这个列表将各种列表和说明的元素归纳为五个素质——每个人事经理希望程序员拥有的。</p>
<h4>1、智力</h4>
<p>虽然在招工启示中很少出现“更聪明”这样的字眼，但这是一个程序员工作必备的。Mark Herschberg是ZepFrog的CEO以及麻省理工学院(MIT)兼职讲师，在他的职业生涯中进行过很多次的招聘。实际上，他用了10个礼拜时间创建了一个20人的部门并招聘了许多来自创业公司或大企业如NBC和Sears的程序员。Herschberg解释说：“聪明的人会好的多。你可以教他们技能或知识但你没法教给他们智慧。”</p>
<p>Mallery同意这一点。“我们的工程师中前百分之一到百分之二的人与其他人最大的不同在于他们可以利用其高超的智慧来攻克问题而其他人则要用百分之九十的时间来纠正自己的错误。仅有的一些坏苹果会脱慢一个团队的效率因为所有人都需要为他们写的坏代码。”</p>
<h4>2、把事情做好（GTD——Get Things Done）</h4>
<p>Joel Spolsky，Fog Creek Software的创始人，有一个在技术产业被经常引用的两段式招聘理念：“聪明，而且能把事情做好”。他在文章（<a href="http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html">The Guerrilla Guide to Interviewing (version 3.0)</a>）中如是说。Spolsky阐释了为什么只有聪明还是不够。“那些聪明但没法<strong>把事情做好</strong>的人经常是有博士学位且在没有人会听他的大公司工作，因为他们完全不切实际。”一些人称之为“自我驱动”或“内部动机”，但落实到开发工作上则需要产生结果。</p>
<h4>3、算法和分析技能</h4>
<p>一个求职者<strong>能够思考</strong>并不够，还需要他懂<strong>如何思考</strong>。大多数招工启示称之为“过硬的分析技能”。Herschberg将其更进一步，寻找不同的思维模式，因为求职者所熟悉的其他类型的思维，不止是抽象层或面向对象原则，可以增加团队的维度。</p>
<h4>4、沟通技巧</h4>
<p>Puramu，拥有五年技术管理经验的Arizona的社交媒体经理，在IT.Toolbox.com上指出一些程序员“自傲于不善沟通”并认为他们的代码能独立运行且完全不需要进行解释。Puramu简单地评论：“这很傻”。</p>
<p>Herschberg说：“软件开发更多的是一个社会学挑战而不是简单的技术挑战。成员之间交流的顺畅以共享思路与问题是非常重要的。他们至少要能够与其他工程师进行交流；最理想的是能够与非工程师交流。”</p>
<h4>5、正确的个人理念</h4>
<p>正确的个人理念每个公司都不相同，但都包括了以团队为重心的态度，胜利的姿态，谦逊以及好奇心。Herschberg描述了他所寻找的：“不止是一个积极的态度，还要如某人所说，‘我会找到一个方法来获得成功。’”</p>
<p>同样，Mallery的观点也是类似的。“缺乏自我是构造一个成功的由优秀工程师组成的团队的重要部分。这往往可以在那些敏捷或其他基于合作的环境下工作良好的工程师身上发现。他们并不考虑关于‘自己’的事情，而是考虑‘我们’的事情，而且他们会努力让最终结果变得更好，即便他们没有获得全部的荣誉。”</p>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/10/qualities-every-hiring-manager-wants-in-a-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>11个最常用的MySQL语句</title>
		<link>http://sheneyan.com/blog/2010/10/11-most-common-mysql-queries/</link>
		<comments>http://sheneyan.com/blog/2010/10/11-most-common-mysql-queries/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 02:02:39 +0000</pubDate>
		<dc:creator>子乌</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[翻译]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[教程]]></category>

		<guid isPermaLink="false">http://sheneyan.com/blog/?p=1265</guid>
		<description><![CDATA[<ul>
<li>作者： <a href="http://www.databasejournal.com/feedback.php/http://www.databasejournal.com/features/mysql/article.php/3904531" title="Sachin Khosla">Sachin Khosla</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-06</li>
<li>英文原文：<a href="http://www.databasejournal.com/features/mysql/article.php/3904531/article.htm">The 10 Most Common MySQL Queries</a></li>
</ul>
<p class="notes">子乌注：嗯，纯入门的mysql教程。</p>
<h4>1、创建表</h4>
<p>在正常情况下估计没几个人会每次都使用脚本创建表(<span class="notes">嗯，深得我心……</span>)。不过，当你开始创建一个应用的时候，你需要创建数据库表。你可以使用下列语句来创建一个带主键的表。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&#160;&#160;MySQL</div><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span>  <span style="color: #008000;">'emp'</span> <span style="color: #FF00FF;">&#40;</span>
  <span style="color: #008000;">'id'</span> <span style="color: #999900; font-weight: bold;">INTEGER</span> <span style="color: #FF9900; font-weight: bold;">UNSIGNED</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #FF9900; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">'[......]</span></div></div><p class='read-more'><a href='http://sheneyan.com/blog/2010/10/11-most-common-mysql-queries/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<ul>
<li>作者： <a href="http://www.databasejournal.com/feedback.php/http://www.databasejournal.com/features/mysql/article.php/3904531" title="Sachin Khosla">Sachin Khosla</a></li>
<li>译者：<a href="http://sheneyan.com/blog">Sheneyan(子乌)</a></li>
<li>时间：2010-10-06</li>
<li>英文原文：<a href="http://www.databasejournal.com/features/mysql/article.php/3904531/article.htm">The 10 Most Common MySQL Queries</a></li>
</ul>
<p class="notes">子乌注：嗯，纯入门的mysql教程。</p>
<h4>1、创建表</h4>
<p>在正常情况下估计没几个人会每次都使用脚本创建表(<span class="notes">嗯，深得我心……</span>)。不过，当你开始创建一个应用的时候，你需要创建数据库表。你可以使用下列语句来创建一个带主键的表。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span>  <span style="color: #008000;">'emp'</span> <span style="color: #FF00FF;">&#40;</span>
  <span style="color: #008000;">'id'</span> <span style="color: #999900; font-weight: bold;">INTEGER</span> <span style="color: #FF9900; font-weight: bold;">UNSIGNED</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #FF9900; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">'name'</span> <span style="color: #999900; font-weight: bold;">VARCHAR</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">45</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">'lastname'</span> <span style="color: #999900; font-weight: bold;">VARCHAR</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">45</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">'dept'</span> <span style="color: #999900; font-weight: bold;">VARCHAR</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">45</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #008000;">'sales'</span><span style="color: #000033;">,</span>
  <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">'id'</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span>
<span style="color: #990099; font-weight: bold;">ENGINE</span> <span style="color: #CC0099;">=</span> <span style="color: #990099; font-weight: bold;">InnoDB</span><span style="color: #000033;">;</span></pre></div></div>

<p>上述语句在指定数据库中创建了一个名为“emp”的表。同时会有一个有主键约束的自增长字段“id”，自增保证了每次插入新行的时候id都会加1，而主键约束则用来检验重复值。字段“dept”被赋予了默认值（当没设定内容时为“sales”）。你可以在创建表的时候指定“引擎”。否则会使用默认引擎（MyISAM）。我们在这里使用“InnoDB”是因为它支持<strong>外键</strong>和事务处理。</p>
<h4>2、 插入语句</h4>
<p>现在你的数据库里有了一张表，我们接下来看看如何在表里插数据。你可能已经使用插入语句很多次了，不过你用过既可以插入也可以更新（需要的话）的语句吗？这可以使用关键字“on DUPLICATE KEY”实现。下面是个例子：</p>
<h5>简单的插入语句</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">insert</span> <span style="color: #990099; font-weight: bold;">into</span> emp <span style="color: #FF00FF;">&#40;</span>name<span style="color: #000033;">,</span>lastname<span style="color: #000033;">,</span>dept<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">values</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">'new name'</span><span style="color: #000033;">,</span><span style="color: #008000;">'new last name'</span><span style="color: #000033;">,</span><span style="color: #008000;">'Accounts'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<h5>插入/更新语句</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">insert</span> <span style="color: #990099; font-weight: bold;">into</span> emp <span style="color: #FF00FF;">&#40;</span>id<span style="color: #000033;">,</span>name<span style="color: #000033;">,</span>lastname<span style="color: #000033;">,</span>dept<span style="color: #FF00FF;">&#41;</span> 
<span style="color: #990099; font-weight: bold;">values</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">'key that already exists'</span><span style="color: #000033;">,</span> <span style="color: #008000;">'new name'</span><span style="color: #000033;">,</span><span style="color: #008000;">'new last name'</span><span style="color: #000033;">,</span><span style="color: #008000;">'Accounts'</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #990099; font-weight: bold;">on</span> <span style="color: #990099; font-weight: bold;">duplicate KEY</span> <span style="color: #990099; font-weight: bold;">UPDATE</span>  name<span style="color: #CC0099;">=</span><span style="color: #008000;">'default name'</span><span style="color: #000033;">,</span> lastname<span style="color: #CC0099;">=</span><span style="color: #008000;">'default last name'</span><span style="color: #000033;">;</span></pre></div></div>

<p>在上面的查询语句中，如果传递给“id”的值已经存在，我们可以更新该行的内容而不是插入新行。当你需要检验字段而不是直接插入自增值时这会相当有用。</p>
<h4>3、 连接</h4>
<p>因为连接有太多类型而显得很复杂。在不同的数据库中连接拥有不同的名称：自连接（self join），外连接（outer join），内连接（inner join），自然连接（natural join）等等。我们通常在两张表之间使用连接以获取数据。</p>
<p>让我们假设我们有另一张叫做“departments”的表，在其中存放了所有部门的数据。如果你想要获取带部门信息的雇员信息，查询语句应该是长这样子：</p>
<h5>常规连接（Regular join<span class="notes">子乌注：这并不是连接的一种定义，只是来与左连接和右连接区分而已</span>）</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">select</span> emp.name<span style="color: #000033;">,</span>department.name <span style="color: #990099; font-weight: bold;">from</span> emp 
<span style="color: #990099; font-weight: bold;">join</span> department <span style="color: #990099; font-weight: bold;">on</span> emp.dept <span style="color: #CC0099;">=</span> department.name</pre></div></div>

<h5>左连接（Left join）</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">select</span> emp.name<span style="color: #000033;">,</span>department.name <span style="color: #990099; font-weight: bold;">from</span> emp 
<span style="color: #000099;">left</span> <span style="color: #990099; font-weight: bold;">join</span> department <span style="color: #990099; font-weight: bold;">on</span> emp.dept <span style="color: #CC0099;">=</span> department.name</pre></div></div>

<h5>右连接（Right join）</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">select</span> emp.name<span style="color: #000033;">,</span>department.name <span style="color: #990099; font-weight: bold;">from</span> emp 
<span style="color: #000099;">right</span> <span style="color: #990099; font-weight: bold;">join</span> department <span style="color: #990099; font-weight: bold;">on</span> emp.dept <span style="color: #CC0099;">=</span> department.name</pre></div></div>

<p>常规连接会取得两张表中满足条件的全部数据。左连接会匹配符合条件的记录，不过它也会返回左表中不符合条件的数据。另一方面，右连接会取得右表中所有不符合条件的数据。（<span class="notes">子乌注：话说我还是喜欢oracle中外联的简化写法(+)，多好看啊</span>）</p>
<h4>4、 创建和删除约束</h4>
<p>如果你经常需要编辑/创建/删除表的约束，你可以这么写：</p>
<h5>添加主键</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">ALTER</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">'TABLE<span style="color: #008080; font-weight: bold;">_</span>NAME'</span>  
<span style="color: #990099; font-weight: bold;">DROP</span> <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span><span style="color: #000033;">,</span> <span style="color: #990099; font-weight: bold;">ADD</span> <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">'COLUMN<span style="color: #008080; font-weight: bold;">_</span>NAME'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<h5>删除主键</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">ALTER</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">'TABLE<span style="color: #008080; font-weight: bold;">_</span>NAME'</span>  <span style="color: #990099; font-weight: bold;">DROP</span> <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span><span style="color: #000033;">;</span></pre></div></div>

<p>在添加主键的时候，我们需要先删除已经添加的主键然后将新主键加到新字段上。否则将不允许加主键。</p>
<h4>5、 Order by，having子句</h4>
<p>Order by用于将数据按照指定字段重新整理，而<code>having</code>则用于过滤结果集。当你需要从一个大数据库中获取特定信息时这会非常有用：</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Select</span> <span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">from</span> TABLE_NAME 
<span style="color: #990099; font-weight: bold;">group by</span> dept  <span style="color: #990099; font-weight: bold;">having</span> salary <span style="color: #CC0099;">&gt;</span> <span style="color: #008080;">10000</span><span style="color: #000033;">;</span></pre></div></div>

<p>上述查询语句中会返回根据部门进行组织且工资大于10000的员工数据。值得注意的是当我们使用没有“order by”的“having”子句时，它更像“where”子句(<span class="notes">子乌注：对于oracle用户来说（我忘记sqlserver是不是也是这样了……）需要注意的地方是，mysql的group by可以不用将字段列明！而且结果也不太一样！确实更像where一些</span>)。</p>
<h4>6、 添加索引和搜索查询</h4>
<p>为一个字段创建索引毫无疑问会减少（<span class="notes">原文是increase……</span>）对数据库的查询，而索引是基于字段基础创建。例如，在我们的示例表“emp”，如果我们大部分获取数据的查询都是使用字段id，那为字段id建一个索引会是个明智的决定。</p>
<p>查询时，MySQL首先在已建立的索引中搜索ID，如果找不到则会在表级上运行查询。所以，正确地建立索引将提高这个过程的速度。</p>
<p>为了创建索引，可以使用以下语句：</p>
<h5>建表时创建索引</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span>  <span style="color: #008000;">'emp'</span> <span style="color: #FF00FF;">&#40;</span>
Name <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">45</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">'id'</span> <span style="color: #999900; font-weight: bold;">INT</span><span style="color: #000033;">,</span> <span style="color: #990099; font-weight: bold;">INDEX</span><span style="color: #FF00FF;">&#40;</span>ID<span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span></pre></div></div>

<p class="notes">子乌注：如果已经是主键则无须创建索引。</p>
<h5>为已存在的表创建索引</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Create</span> <span style="color: #990099; font-weight: bold;">Index</span> id_index <span style="color: #990099; font-weight: bold;">on</span> emp<span style="color: #FF00FF;">&#40;</span>ID<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<h4>7、 复合函数查询</h4>
<p>复合函数用于对从数据库取得的数据进行数学运算。这些函数包括：<code>sum</code>(<span class="notes">总和</span>)、<code>count</code>(<span class="notes">总数</span>)等。例如，如果你想计算工作于特定部门的雇员数，你可以这么写：</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">select</span> <span style="color: #990099; font-weight: bold;">distinct</span> name<span style="color: #000033;">,</span><span style="color: #000099;">count</span><span style="color: #FF00FF;">&#40;</span>dept<span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">as</span> cnt <span style="color: #990099; font-weight: bold;">from</span> emp
 <span style="color: #990099; font-weight: bold;">group by</span> dept  <span style="color: #990099; font-weight: bold;">order by</span> cnt <span style="color: #990099; font-weight: bold;">DESC</span><span style="color: #000033;">;</span></pre></div></div>

<p>上述语句会返回员工姓名及部门数，并会根据返回的总数对数据进行逆序组合。(<span class="notes">子乌注：对oracle用户来说（呃……我主要用oracle工作），order by的参数得是count(dept)而非cnt</span>)</p>
<h4>8、 变更及修改表字段</h4>
<p>表创建后可能会频繁修改。通过下面的语句我们可以看到如何给一个已存在的表添加/修改字段。</p>
<h5>添加字段</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Alter</span> <span style="color: #990099; font-weight: bold;">table</span> <span style="color: #008000;">'emp'</span> <span style="color: #990099; font-weight: bold;">add</span> <span style="color: #990099; font-weight: bold;">column</span> salary <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">45</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<h5>修改字段</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Alter</span> <span style="color: #990099; font-weight: bold;">table</span> <span style="color: #008000;">'emp'</span> <span style="color: #990099; font-weight: bold;">modify</span> <span style="color: #990099; font-weight: bold;">column</span> salary <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">10</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<h5>重命名字段</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Alter</span> <span style="color: #990099; font-weight: bold;">table</span> <span style="color: #008000;">'emp'</span> change salary salary2 <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">45</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<h5>删除字段</h5>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Alter</span> <span style="color: #990099; font-weight: bold;">table</span> <span style="color: #008000;">'emp'</span> <span style="color: #990099; font-weight: bold;">drop</span> <span style="color: #990099; font-weight: bold;">column</span> salary<span style="color: #000033;">;</span></pre></div></div>

<p class="notes">子乌注：对oracle用户来说（我又来了……），尽量不要随意修改表结构，否则与该表相关的所有对象（存储、触发器、索引、函数等等）全部会失效，需要重新编译。</p>
<h4>9、 使用非重复值创建新表</h4>
<p>假设你的数据库表中已经有了上千的数据，而你发现数据录入并不正确，存在着重复记录。现在你打算清理所有的垃圾并创建一个新表。让我们看看该如何做吧：</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">create</span> <span style="color: #990099; font-weight: bold;">table</span> <span style="color: #008000;">'emp2'</span> <span style="color: #990099; font-weight: bold;">as</span> <span style="color: #990099; font-weight: bold;">select</span> <span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">from</span> emp
 <span style="color: #990099; font-weight: bold;">where</span> <span style="color: #008080;">1</span> <span style="color: #990099; font-weight: bold;">group by</span> <span style="color: #008000;">'lastname'</span><span style="color: #000033;">;</span></pre></div></div>

<p>嗯，现在创建了一个只有唯一“last name”的雇员信息的新表“emp2”。你可以使用不同的接口来排序你的表。</p>
<h4>10、 复制数据库并优化表</h4>
<p>很多时候你的应用需要进行计划备份并通过邮件发送或将其存放在安全的地方。你可以写个脚本执行并设置一个cron来做这事情。这会节省大量用于备份你的数据的工作并避免发生无可挽回的错误。让我们看看你该如何创建数据库的备份并同时优化表。</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;Bash</div><pre class="bash" style="font-family:monospace;">mysqldump –h localhost –u username –ppassword databasename <span style="color: #000000; font-weight: bold;">&gt;</span> backup_file.sql</pre></div></div>

<p>这会创建一个<dfn>sql dump</dfn>文件，可以将其再次导入以恢复数据库。</p>
<h4>11、 优化表</h4>
<p>在MySQL中优化表相当的简单，就像标题所说的那样：</p>

<div class="wp_syntax"><div class="code"><div class='code_header'>Language:&nbsp;&nbsp;MySQL</div><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Optimize</span> <span style="color: #990099; font-weight: bold;">table</span> TABLE_NAME</pre></div></div>

<h4>结论</h4>
<p>你已经学会了这些在每天编码中都会用到的最常用的MySQL语句。你可以针对自己的工作场景来改进他们。</p>
]]></content:encoded>
			<wfw:commentRss>http://sheneyan.com/blog/2010/10/11-most-common-mysql-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

