<?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>焦秋野 &#124; 关注网站设计,前端资讯,用户体验,SEO,网站设计 &#187; 网址导航制作</title>
	<atom:link href="http://www.imjqy.com/tag/%e7%bd%91%e5%9d%80%e5%af%bc%e8%88%aa%e5%88%b6%e4%bd%9c/feed" rel="self" type="application/rss+xml" />
	<link>http://www.imjqy.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Feb 2012 00:17:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>导航类网页心得</title>
		<link>http://www.imjqy.com/cssxhtml/%e5%af%bc%e8%88%aa%e7%b1%bb%e7%bd%91%e9%a1%b5%e5%bf%83%e5%be%97</link>
		<comments>http://www.imjqy.com/cssxhtml/%e5%af%bc%e8%88%aa%e7%b1%bb%e7%bd%91%e9%a1%b5%e5%bf%83%e5%be%97#comments</comments>
		<pubDate>Mon, 28 Jun 2010 07:25:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS+xHtml]]></category>
		<category><![CDATA[网址导航制作]]></category>

		<guid isPermaLink="false">http://www.imjqy.com/?p=506</guid>
		<description><![CDATA[导航类网页，内有大量的锚文字，大量的链接，如何布局（当然不是用table），能让这些链接群排列整齐的同时有方便维护和批量控制操作使我花了些头脑思考。 在做这两个页面的（1&#124;2）时候，产生一些想法， 在这里记录。 这个页面时全球网站导航，页面中用到大量国旗小图标，减少页面加载，请求服务器次数是需要考虑的问题之一，其二是将每个图片和其后的两行文字看做一个模块，这样这个这页面可以用很少的类即可完成，其实只是一个模块的重复利用。 用ps的选区工具（M）将所有小图片分别扣出（ctrl+C），新建透明图像文件（ctrl+n），分别放到新的透明背景的图片上（ctrl+v），排列整齐，这样，这个网页就只用到一张不到10k的图片，只加载了一次图片，即可同步显示所有小图片了。 一个模块的前端代码 css部分 .web1,.web2,.web3,.web4,.web5,.web6,.web7,.web8,.web9{ width:49px; height:32px; float:left; display:inline; margin-top:15px; margin-bottom:15px;} .web1 {background:url(pic_all.gif) no-repeat 0 -42px;} .web2 {background:url(pic_all.gif) no-repeat -49px -42px;} .web3 {background:url(pic_all.gif) no-repeat -98px -42px;} .web4 {background:url(pic_all.gif) no-repeat -147px -42px;} .web5 {background:url(pic_all.gif) no-repeat 0 -157px;} .web6 &#8230; <a href="http://www.imjqy.com/cssxhtml/%e5%af%bc%e8%88%aa%e7%b1%bb%e7%bd%91%e9%a1%b5%e5%bf%83%e5%be%97">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.imjqy.com/wp-content/uploads/2010/06/333.jpg"></a><a href="http://www.imjqy.com/wp-content/uploads/2010/06/222.jpg"></a>导航类网页，内有大量的锚文字，大量的链接，如何布局（当然不是用table），能让这些链接群排列整齐的同时有方便维护和批量控制操作使我花了些头脑思考。</p>
<p>在做这两个页面的（<a href="http://www.lmlq.com/Msite/" target="_blank">1</a>|<a href="http://www.lmlq.com/dh/" target="_blank">2</a>）时候，产生一些想法， 在这里记录。</p>
<p><span id="more-506"></span></p>
<p><a href="http://www.imjqy.com/wp-content/uploads/2010/06/111.jpg"><img class="aligncenter size-medium wp-image-507" title="111" src="http://www.imjqy.com/wp-content/uploads/2010/06/111-180x300.jpg" alt="" width="180" height="300" /></a></p>
<p>这个页面时全球网站导航，页面中用到大量国旗小图标，减少页面加载，请求服务器次数是需要考虑的问题之一，其二是将每个图片和其后的两行文字看做一个模块，这样这个这页面可以用很少的类即可完成，其实只是一个模块的重复利用。</p>
<p><img title="222" src="http://www.imjqy.com/wp-content/uploads/2010/06/222.jpg" alt="" width="236" height="195" /></p>
<p>用ps的选区工具（M）将所有小图片分别扣出（ctrl+C），新建透明图像文件（ctrl+n），分别放到新的透明背景的图片上（ctrl+v），排列整齐，这样，这个网页就只用到一张不到10k的图片，只加载了一次图片，即可同步显示所有小图片了。</p>
<p>一个模块的前端代码</p>
<p><img title="333" src="http://www.imjqy.com/wp-content/uploads/2010/06/333-300x202.jpg" alt="" width="300" height="202" /></p>
<p>css部分</p>
<p>.web1,.web2,.web3,.web4,.web5,.web6,.web7,.web8,.web9{ width:49px; height:32px; float:left; display:inline; margin-top:15px; margin-bottom:15px;}</p>
<p>.web1 {background:url(pic_all.gif) no-repeat 0 -42px;}</p>
<p>.web2 {background:url(pic_all.gif) no-repeat -49px -42px;}</p>
<p>.web3 {background:url(pic_all.gif) no-repeat -98px -42px;}</p>
<p>.web4 {background:url(pic_all.gif) no-repeat -147px -42px;}</p>
<p>.web5 {background:url(pic_all.gif) no-repeat 0 -157px;}</p>
<p>.web6 {background:url(pic_all.gif) no-repeat -51px -157px;}</p>
<p>.web7 {background:url(pic_all.gif) no-repeat -100px -157px;}</p>
<p>.web8 {background:url(pic_all.gif) no-repeat -149px -157px;}</p>
<p>.web9 {background:url(pic_all.gif) no-repeat 0 -74px;}</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>页面2是大量整齐排列的分类网址列表。为了回避table（其实这里用table确实很方便），想要把这些同行内长短不一的文字，在同列排列整齐确实不太容易。直接上代码：</p>
<p><code><a href="http://www.lmlq.com/dh/" target="_blank">网页右键查看源文件</a></p>
<p></code>css部分</p>
<p class="dh_darkred">.dh_darkred { font-size:14px; color:#b91717;}</p>
<p>.dh_darkred a { color:#b91717;}</p>
<p>.all_link { font-size:14px; height:auto; border-bottom:#666666 dotted 1px; padding-bottom:20px;}</p>
<p>.all_link ul {}</p>
<p>.all_link li,.pro_all_link li { float:left; display:inline; margin-right:10px; width:92px; line-height:30px;}</p>
<p>.first_link { background:url(red_dock.gif) no-repeat left center; text-indent:10px;}</p>
<p>.sec_ul { margin-left:113px;}</p>
<p>.suojin { margin-left:-10px;}</p>
<p>.dh_head { margin-top:10px;}</p>
<p>主要思想是每行都是一个ul，不同行间的ul用li的margin对齐，在li宽度是一定的情况下可以实现。</p>
<p>.dh_darkred a 控制首列字体（链接）的红色</p>
<p>令li float:left，使列表横向平铺。将li的宽度设到92px（大于页面内所有锚文字的宽度），即可对齐。</p>
<p>注意，这里li之所以margin-right而不是margin-left是因为，使用左间距，第一列的文字也会移动，为了偷懒少使用一个类，这样做法比较简便。</p>
<p>ul内的第二个li要加小三角背景图片，使得第二个li的文字内容有10px的缩进，所以.sec_ul 控制第二行ul列表与上一行对齐。</p>
<p>第一行的ul与第二行的ul组成一个模块，这个页面重复使用。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.imjqy.com/cssxhtml/%e5%af%bc%e8%88%aa%e7%b1%bb%e7%bd%91%e9%a1%b5%e5%bf%83%e5%be%97/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

