一个经得起时间考验的人
WebDesign
WebDesign
IE8中选择网页文字引起CPU占用100%的奇怪问题
七 31st
《精通CSS+DIV网页样式与布局》配套光盘_书中所有实例源文件
四 14th
从电驴下载了《精通CSS+DIV网页样式与布局》一书的视频,可是却一直找不到书中所有实例的源文件,使用Google或者Baidu找到的相关内容都是通过QQ邮箱文件中转站来下载。
可是前几天去下载的时候却提示流量超过限制的错误信息,刚才的尝试却提示“您填写的提取码不正确”,看来原作者已经重新发布了此资源。
在这里不得不赞一下迅雷找资源的能力,特别是针对那些原始资源已经失效的资源,很快很强大。
在迅雷里直接搜索“《精通CSS DIV网页样式与布局》配套光盘_书中所有实例_源文件”就找到了一大堆资源,然后使用迅雷下载即可。
或者直接使用迅雷下载如下链接:
请右键使用迅雷下载《精通CSS+DIV网页样式与布局》配套光盘_书中所有实例_源文件_视频教程.rar
虽然原始资源已经失效,但是迅雷能够自动找到匹配的资源进行下载。
如果想要但是确实无法下载的朋友,请到这里求助
光盘内容简单介绍
透彻讲解CSS应用于各种网页元素的步骤和技巧
深入剖析CSS+DIV布局的思路和方法
比较IE和Firefox浏览器对CSS支持的不同效果
扩展CSS与JavaScript,Ajax,XML的综合应用
全面解析5个完整网站的CSS+DIV布局与美化方案
20堂240分钟视频课程讲解关键技术
所有实例的源代码,素材和最终效果文件
网页代码中meta标签的作用
七 25th
meta标签是内嵌在你网页中的特殊html标签,包含着你有关于你网页的一些隐藏信息。Meat标签的作用是向搜索引擎解释你的网页是有关哪方面信息 的。对于高级的搜索引擎来说,html 的meta 标签并不是什么新奇的东西。但是无论如何它是一个优秀网页不可缺少的。
当你计划搜索引擎优化策略是meta标签是非常重要的。尽管如此,一般的加入meta 并不能帮助你在搜索引擎中获得更好的排名。有好几种meta标签,但重要的有以下几个:description标签, keywords标签, title标签(严格来说title不算是一个标签)。当你不时刷新标签时这几个标签显得特别的重要。如果你希望搜索引擎对你的网站进行索引时就会用到 html标签的重定向(redirect)标签与robots标签.
注意:调查表只有20%的网页用到“关键字”与“描述”标签(即keyword, description)
下面是对于这两个标签的例子:
<html>
<head>
<title>标题内容</title>
<meta name=”description” content=”你的描述内容”>
<meta name=”keyword” content=”关键字1,关键字2,—“>
</head>
</html>多个关键字用逗号分开。
title 标签
title 标签可能是你网页中最重要的标签,它是你网页中最先看到的部分。把它放在description 与 keyword前。在这个标签中最好是加上你网站的关键字,title标签在搜索引擎的搜索中占有非常重要的地位。最好是把它放在其他meta标签前,这 更有利于你网站的排名。(注意:有些搜索引擎会按title标签的字母的优先权进行排名,尽量在你的title中使用开始的字母)title标签是人们在 搜索引擎中第一个看到有关你网站的描述,所以尽量把它弄得简单、明了。让人一看就知道你的网站是关于什么的。
Description标签
Description标签就在title后面,该标签可以是一小段(一个或者两个句子)。用于描述你网站。与title标签一样,这也是人们在搜索引擎 列表中链接到你网站的点击。这些描述将鼓动人们去浏览你的网站而不是你竞争对手的。(描述不能太夸张。不然,当访问者到你网站发现内容根本不是你说的那个 样子,那么他很快就会退出去。)很多搜索引擎允许描述的字数在150个左右,所以你要保证你的描述在150以下,否则搜索引擎会自动把多余的部分剪去从而 造成你网站的描述的不完整。搜索引擎认为描述里的关键字远比网页中的内容要重要(好像现在这种情况不是那么明显了)。真如上所述,这里提供了非常重要的信 息:确定你的描述能正确的反映你网站的主题,尽量在描述中加入你主要的关键字,越靠meta的关键字意义越大。这样会突显你的关键字。
现在大多的搜索引擎(google除外)都会支持descriptin标签。如果你不使用的话你将会失去排名靠前的可能。
keyword 标签
相比于description与title标签,keyword标签显得并不是那么重要了。有些搜索引擎把它完全地忽略,但是使用下正确的keyword标签对提高排名仍然有效。
除了搜索引擎外,一般情况下人们是看不到的。keyword标签是一个隐藏的标签,向搜索引擎提供了一组与你的页面有关的的关键字或关键短语列表。你可以 用相应的工具找出一系列适用于你网站的关键字。(注意:关键字标签中只能包括与你本页内容相关的关键字列表。所有在这里的关键字必须与页面的内容相联 系。)
提示:在你每一个页面中组织相关的关键字,每个页面必须专注于不同的产品或者内容。在标签中列满关键字对于提高你网站的排名并没有好处。多个关键字间用逗 号用隔,逗号表示是逻辑“或”的意思。空格表示逻辑“与”。这是正式在keyword标签中描述关键字必须的。尽管如此,很多搜索引擎也会把关键字间以空 格分开以达到能搜索出更相关的结果的目的。这样做的意义是,搜索引擎会把空格分开的关键字根据一定的方式自由组合。可以尝试用两种方法,看哪一种更加适合 你。
关键字不宜以同一形式重复3-6次,一般这已经认为是最大的关键字重复数(好像现在又发生了变化)。所以,尽量避免把你的关键字一次又一次地不断重复。这 对于每一个搜索引擎来说是SPAM(关键字垃圾),你会因此而受到惩罚。大多数的搜索引擎会允许你在keyword标签中使用最多1000个字符。通常, 对每一个页面使用相关连的关键字会提高你网站的排名。一个很重要的因素是你关键字冗余度,如果你一个关键字是一个字符,而你的keyword标签中有 100个字符,那么你关键字的冗余度就为1%。搜索引擎将会利用相关的算法对你的关键字冗余度进行统计你网页中的每一个重要的词或短语。去除多余的关键字 有利于提高你网站的排名。
网站Gzip性能查询工具
六 8th
Introducing GIDZipTest™, a simple web page compression / gzip test tool.
Add some PHP code to compress your web pages and test it out with this quick gzip / deflate encoding test tool.
NEW! This version of the tool is able to identify web pages with deflate encoded content as well. Also, this tool analyses compressed web pages much faster than the previous one which was located at www.desilva.biz/gzip-test.php.
Compress Your Web
In my never-ending quest to get my web pages to load super-fast, I chanced upon ob_gzhandler() one day while researching the uses of ob_start() in PHP.
What it does is, compress your html and web pages every time it’s loaded onto a browser. Cool!
As usual, I will not get too technical on how it works but instead show you how to use it on your web pages like I have. And believe me, it’s so simple you can even add it to your already existing pages without too much effort.
If it’s not already obvious, you must be certain that you use PHP for your web pages and that your server supports it at least.
About PHP on your server
Then, you have to be sure that the version of PHP on your web server is extended with the zlib module. To find out quickly, just open NotePad and type in the following:
php:
<?php
phpinfo();
?> Then save the file as phpinfo.php and upload it to your webserver. Once you view this page on your browser, look for zlib on the web page. If it’s installed, one table on the page would look this: 
On that same page, just note that the PHP version on your web server is 4.0.6 or higher otherwise you can’t use this method to compress your web pages.
Sample code to compress your web pages
To compress your web pages this is basically how you would do it:
<?php
ob_start( ‘ob_gzhandler’ );
?>
This web page is now COMPRESSED!
Table 1. Configuration options list:
zlib.output_compression "0" PHP_INI_SYSTEM|PHP_INI_PERDIR
This is misleading and most likely an error on the page.
If you look at this other page, you’ll notice that the correct configuration option is listed under
Runtime Configuration as:
zlib.output_compression "Off" PHP_INI_ALL
I had the misfortune of reading the wrong info first and wasted a few hours worth of useless code
For anyone wondering what all this means, here’s code that you can use at the top of your scripts (or in a global functions.php file) to http://www.desilva.biz/php/zlib.html "compress your PHP-driven web pages" even better than ob_start( ‘ ob_gzhandler’ ) can:
<?php // compression
$c = ini_get( ‘zlib.output_compression’ );
if( empty($c) ): ini_set( ‘zlib.output_compression’, ’1′ );
ini_set( ‘zlib.output_compression_level’, ’9′ );
/* levels, I think are between 0 (no compression) – 9 (maximum compression). Meanwhile there’s the ‘-1′, which I think is the default compression level, whichever that is! */
endif;
/// the rest of your PHP code / script…
?>
显示和隐藏控件style.display
六 15th
display Attribute | display Property
Sets or retrieves whether the object is rendered.
Syntax
HTML { display : sDisplay } Scripting object.style.display [ = sDisplay ]
Possible Values
sDisplay String that specifies or receives one of the following values.
block Object is rendered as a block element. none Object is not rendered. inline Default. Object is rendered as an inline element sized by the dimensions of the content. inline-block Object is rendered inline, but the contents of the object are rendered as a block element. Adjacent inline elements are rendered on the same line, space permitting. list-item Microsoft Internet Explorer 6 and later. Object is rendered as a block element, and a list-item marker is added. table-header-group Table header is always displayed before all other rows and row groups, and after any top captions. The header is displayed on each page spanned by a table. table-footer-group Table footer is always displayed after all other rows and row groups, and before any bottom captions. The footer is displayed on each page spanned by a table. The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of inline for all objects with the following exceptions:
ADDRESS block BLOCKQUOTE block BODY block CENTER block COL block COLGROUP block DD block DIR block DIV block DL block DT block FIELDSET block FORM block FRAME none hn block HR block IFRAME block LEGEND block LI list-item LISTING block MARQUEE block MENU block OL block P block PLAINTEXT block PRE block TABLE block TBODY none TD block TFOOT none TH block THEAD none TR block UL block XMP block The Cascading Style Sheets (CSS) attribute is not inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft Internet Explorer 5. For more information, see About Dynamic Properties.
Remarks
In Internet Explorer 4.0, the block, inline, and list-item values are not supported explicitly, but do render the element.
The block and inline values are supported explicitly as of Internet Explorer 5.
In Internet Explorer 5.5 and earlier, the default value of this property for li elements is block.
The inline-block value is supported as of Internet Explorer 5.5. You can use this value to give an object a layout without specifying the object’s height or width.
All visible HTMLobjects are block or inline. For example, a div object is a block element, and a span object is an inline element. Block elements typically start a new line and can contain other block elements and inline elements. Inline elements do not typically start a new line and can contain other inline elements or data. Changing the values for the display property affects the layout of the surrounding content by:
- Adding a new line after the element with the value block.
- Removing a line from the element with the value inline.
- Hiding the data for the element with the value none.
In contrast to the visibility property, display=none reserves no space for the object on the screen.
The table-header-group and table-footer-group values can be used to specify that the contents of the tHead and tFoot objects are displayed on every page for a table that spans multiple pages.
Examples
This example shows the effect of changing the values for the display property between inline, block, and none.
<SPAN ID=oSpan> This is a SPAN </SPAN> in a sentence. <P> <INPUT TYPE=button VALUE="Block" onclick="oSpan.style.display='block'">This example uses function calls to hide and show table rows and cells.
Hide Example
<SCRIPT> function getPets() { oRow1Cell2.style.display="none"; oRow2Cell2.style.display="block"; oRow3Cell2.style.display="none"; } </SCRIPT> : <TABLE> <TR ID="oRow1"><TD>Horses</TD> <TD ID="oRow1Cell2">Thoroughbreds</TD> <TD>Fast</TD></TR> <TR ID="oRow2"><TD>Dogs</TD> <TD ID="oRow2Cell2">Greyhounds</TD> <TD>Fast</TD></TR> <TR ID="oRow3"><TD>Marsupials</TD> <TD ID="oRow3Cell2">Opossums</TD> <TD>Slow</TD></TR> </TABLE> : <INPUT TYPE=button onclick="getPets()" VALUE="Show household pets">
Standards Information
This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1)
.
Applies To
A, ABBR, ACRONYM, ADDRESS, APPLET, B, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, CUSTOM, DD, defaults, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, hn, HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, NOBR, OBJECT, OL, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also