??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品国产一区二区精华液,jizz免费一区二区三区,狠狠综合久久av一区二区蜜桃http://www.aygfsteel.com/imfisher/zh-cnSat, 17 May 2025 17:11:02 GMTSat, 17 May 2025 17:11:02 GMT60CSS自动换行http://www.aygfsteel.com/imfisher/archive/2007/11/07/158805.html愚h愚hWed, 07 Nov 2007 05:57:00 GMThttp://www.aygfsteel.com/imfisher/archive/2007/11/07/158805.htmlhttp://www.aygfsteel.com/imfisher/comments/158805.htmlhttp://www.aygfsteel.com/imfisher/archive/2007/11/07/158805.html#Feedback0http://www.aygfsteel.com/imfisher/comments/commentRss/158805.htmlhttp://www.aygfsteel.com/imfisher/services/trackbacks/158805.html大家都知道连l的英文或数字能是容器被撑大Q不能根据容器的大小自动换行Q下面是 CSS如何他们换行的ҎQ?

对于div

1.QIE览器)white-space:normal; word-break:break-all;q里前者是遵@标准?/strong>

#wrap{white-space:normal; width:200px; }或?wrap{word-break:break-all;width:200px;}eg.<div id="wrap">ddd1111111111111111111111111111111111</div>

效果Q可以实现换?/p>

2.QFirefox览器)white-space:normal; word-break:break-all;overflow:hidden;同样的FF下也没有很好的实现方法,只能隐藏或者加滚动条,当然不加滚动条效果更好!

#wrap{white-space:normal; width:200px; overflow:auto;}或?wrap{word-break:break-all;width:200px; overflow:auto; }eg.<div id="wrap">ddd1111111111111111111111111111111111111111</div>

效果Q容器正常,内容隐藏

对于table

1. (IE览?使用样式table-layout:fixedQ?/strong>
eg.

<style>.tb{table-layout:fixed}</style><table class="tbl" width="80"><tr><td>abcdefghigklmnopqrstuvwxyz 1234567890</td></tr></table>

效果Q可以换?/p>

2.(IE览?使用样式table-layout:fixed与nowrap
eg.

<style>.tb {table-layout:fixed}</style><table class="tb" width="80"><tr><td nowrap>abcdefghigklmnopqrstuvwxyz 1234567890</td></tr></table>

效果Q可以换?/p>

3. (IE览?在用百分比固定td大小情况下用样式table-layout:fixed与nowrap

<style>.tb{table-layout:fixed}</style><table class="tb" width=80><tr><td width=25% nowrap>abcdefghigklmnopqrstuvwxyz 1234567890</td><td nowrap>abcdefghigklmnopqrstuvwxyz 1234567890</td></tr></table>

效果Q两个td均正常换?/p>

3.(Firefox览?在用百分比固定td大小情况下用样式table-layout:fixed与nowrap,q且使用div
eg.

<style>.tb {table-layout:fixed}.td {overflow:hidden;}</style><table class=tb width=80><tr><td width=25% class=td nowrap><div>abcdefghigklmnopqrstuvwxyz 1234567890</div></td><td class=td nowrap><div>abcdefghigklmnopqrstuvwxyz 1234567890</div></td></tr></table>

q里单元格宽度一定要用百分比定义

效果Q正常显C,但不能换行(注:在FF下还没有能容器内容换行的好ҎQ只能用overflow多出的内容隐藏Q以免媄响整体效果)

愚h 2007-11-07 13:57 发表评论
]]>
[转]如何才算掌握Java http://www.aygfsteel.com/imfisher/archive/2007/10/10/151658.html愚h愚hWed, 10 Oct 2007 03:02:00 GMThttp://www.aygfsteel.com/imfisher/archive/2007/10/10/151658.htmlhttp://www.aygfsteel.com/imfisher/comments/151658.htmlhttp://www.aygfsteel.com/imfisher/archive/2007/10/10/151658.html#Feedback0http://www.aygfsteel.com/imfisher/comments/commentRss/151658.htmlhttp://www.aygfsteel.com/imfisher/services/trackbacks/151658.html阅读全文

愚h 2007-10-10 11:02 发表评论
]]>
字符Q字节和~码http://www.aygfsteel.com/imfisher/archive/2007/10/09/151353.html愚h愚hTue, 09 Oct 2007 05:04:00 GMThttp://www.aygfsteel.com/imfisher/archive/2007/10/09/151353.htmlhttp://www.aygfsteel.com/imfisher/comments/151353.htmlhttp://www.aygfsteel.com/imfisher/archive/2007/10/09/151353.html#Feedback0http://www.aygfsteel.com/imfisher/comments/commentRss/151353.htmlhttp://www.aygfsteel.com/imfisher/services/trackbacks/151353.html阅读全文

愚h 2007-10-09 13:04 发表评论
]]>
HTML ?SELECT 选项分组http://www.aygfsteel.com/imfisher/archive/2007/10/09/151346.html愚h愚hTue, 09 Oct 2007 04:54:00 GMThttp://www.aygfsteel.com/imfisher/archive/2007/10/09/151346.htmlhttp://www.aygfsteel.com/imfisher/comments/151346.htmlhttp://www.aygfsteel.com/imfisher/archive/2007/10/09/151346.html#Feedback1http://www.aygfsteel.com/imfisher/comments/commentRss/151346.htmlhttp://www.aygfsteel.com/imfisher/services/trackbacks/151346.html阅读全文

愚h 2007-10-09 12:54 发表评论
]]>
js sort 扩展http://www.aygfsteel.com/imfisher/archive/2007/10/09/151331.html愚h愚hTue, 09 Oct 2007 04:03:00 GMThttp://www.aygfsteel.com/imfisher/archive/2007/10/09/151331.htmlhttp://www.aygfsteel.com/imfisher/comments/151331.htmlhttp://www.aygfsteel.com/imfisher/archive/2007/10/09/151331.html#Feedback0http://www.aygfsteel.com/imfisher/comments/commentRss/151331.htmlhttp://www.aygfsteel.com/imfisher/services/trackbacks/151331.html阅读全文

愚h 2007-10-09 12:03 发表评论
]]>
快速保存网中所有图片的Ҏhttp://www.aygfsteel.com/imfisher/archive/2007/10/09/151310.html愚h愚hTue, 09 Oct 2007 03:25:00 GMThttp://www.aygfsteel.com/imfisher/archive/2007/10/09/151310.htmlhttp://www.aygfsteel.com/imfisher/comments/151310.htmlhttp://www.aygfsteel.com/imfisher/archive/2007/10/09/151310.html#Feedback0http://www.aygfsteel.com/imfisher/comments/commentRss/151310.htmlhttp://www.aygfsteel.com/imfisher/services/trackbacks/151310.html阅读全文

愚h 2007-10-09 11:25 发表评论
]]>
CSS的expressionhttp://www.aygfsteel.com/imfisher/archive/2007/09/21/146975.html愚h愚hFri, 21 Sep 2007 01:40:00 GMThttp://www.aygfsteel.com/imfisher/archive/2007/09/21/146975.htmlhttp://www.aygfsteel.com/imfisher/comments/146975.htmlhttp://www.aygfsteel.com/imfisher/archive/2007/09/21/146975.html#Feedback1http://www.aygfsteel.com/imfisher/comments/commentRss/146975.htmlhttp://www.aygfsteel.com/imfisher/services/trackbacks/146975.html阅读全文

愚h 2007-09-21 09:40 发表评论
]]>
制作1px表格Ҏ的十U方?/title><link>http://www.aygfsteel.com/imfisher/archive/2007/09/17/145841.html</link><dc:creator>愚h</dc:creator><author>愚h</author><pubDate>Mon, 17 Sep 2007 06:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/imfisher/archive/2007/09/17/145841.html</guid><wfw:comment>http://www.aygfsteel.com/imfisher/comments/145841.html</wfw:comment><comments>http://www.aygfsteel.com/imfisher/archive/2007/09/17/145841.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/imfisher/comments/commentRss/145841.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/imfisher/services/trackbacks/145841.html</trackback:ping><description><![CDATA[     摘要: l常会用到表格来昄数据Q需?px的表|转了一文章,可以借鉴一下~  <a href='http://www.aygfsteel.com/imfisher/archive/2007/09/17/145841.html'>阅读全文</a><img src ="http://www.aygfsteel.com/imfisher/aggbug/145841.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/imfisher/" target="_blank">愚h</a> 2007-09-17 14:33 <a href="http://www.aygfsteel.com/imfisher/archive/2007/09/17/145841.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]需要了解的CSS优先U特?/title><link>http://www.aygfsteel.com/imfisher/archive/2007/09/15/145381.html</link><dc:creator>愚h</dc:creator><author>愚h</author><pubDate>Sat, 15 Sep 2007 08:10:00 GMT</pubDate><guid>http://www.aygfsteel.com/imfisher/archive/2007/09/15/145381.html</guid><wfw:comment>http://www.aygfsteel.com/imfisher/comments/145381.html</wfw:comment><comments>http://www.aygfsteel.com/imfisher/archive/2007/09/15/145381.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/imfisher/comments/commentRss/145381.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/imfisher/services/trackbacks/145381.html</trackback:ping><description><![CDATA[<p>原文Q?a target="_blank">CSS Specificity: Things You Should Know</a></p> <p>如果面制作的时候遇到定义的CSS不v作用Q你可能遇到了CSS优先U的问题。CSS优先U在CSS里算是比较难懂的部分Q不同权重的CSS选择器有可能是你出错的原因Q所以作为页面开发h员必M解CSS优先U特性?/p> <p><strong>CSS优先U特性概qͼ</strong></p> <p>1. 通过优先U计,让浏览器先解析哪条CSS规则?br /> 2. 优先U特性经常是你定义的CSS规则不v作用的原因,虽然你认v了作用,然而却不是?br /> 3. 每个选择器都有它的优先层次?br /> 4. 如果两个规则同时作用于一个元素,优先U高的获胜?br /> 5.优先U特性可以分为四c:inline styles, IDs, classes+attributes and elements.<br /> 6.英文好的可以看下q两文章, <a ><strong><font color="#0040b6">CSS Specificity Wars</font></strong></a>?a ><strong><font color="#0040b6">CSS Specificity for Poker Players</font></strong></a><br /> 7.如果选择器有两个{相同的|后面的g覆盖前面的倹{?br /> 8.如果选择器有{不同的|以等U高的算Q比?important?br /> 9.拥有更多优先Ҏ选择器的规则更具有优先特性?br /> 10.后面的规则肯定会覆盖前面相同的规则?br /> 11.内嵌的CSS规则优先U特性最高?br /> 12.CSS文g里,ID的优先Ҏ最高?br /> 13.惌增加优先U,可以使用ID?br /> 14.class比elementU别高?br /> 15.选择器分为四个别,计算方式 0,0,0,0?br /> 16.推荐一个CSS优先U计器Q?a ><strong><font color="#0040b6">CSS Specificity Calculator</font></strong></a>.?/p> <p><strong>什么是优先U特?/strong></p> <p>优先U计是Z军_览器解析哪条规则?#8220;优先U特性的权重关系CSS的显C?#8221;<a ><strong><font color="#0040b6">Understanding Specificity</font></strong></a> Q明白优先Ҏ)?/p> <p>选择器的优先U特性决定了同一个元素多条规则下哪条规则实施?a ><strong><font color="#0040b6">Selector Specificity</font></strong></a> Q选择器优先Q?/p> <p>每个选择器都有优先Q两个选择器作用与同一个元素,优先U高的获胜?/p> <p>CSS优先U别:</p> <p>1<strong>. Inline styles</strong>  内嵌面的CSS样式Q比?lt;h1 style=”color:#000″></h1></p> <p>2.<strong>IDs</strong>  比如#myid</p> <p>3.<strong>Classes, attributes and pseudo-classes</strong> 比如 .classes, [attributes]:hover, :focus</p> <p>4.<strong>Elements and pseudo-elements</strong> 比如 div,p,h1,包括:before?after</p> <p><strong>怎样量优先U?</strong></p> <p>内嵌的ؓ1000QID?00Q?strong>Classes, attributes and pseudo-classes</strong>?0Q?strong>Elements and pseudo-elements</strong> ??/p> <p><code>body #content .data img:hover q里的特性gؓ 0,1,2,2</code></p> <p><code>下面q张星球大战的图片也许能帮助你记忆:</code></p> <p><a ><img title="CSS Specificity Wars" height="386" alt="CSS Specificity Wars" src="http://www.smashingmagazine.com/images/css-specificity/specificity-wars.jpg" width="507" border="0" /><br /> </a></p> <p><code><strong>来测试下?/strong></code></p> <p><code></p> <p> <table class="shortcuts" cellspacing="0"> <tbody> <tr> <td class="num">1</td> <td>* { }</td> <td>0</td> </tr> <tr> <td class="num">3</td> <td>li:first-line { }</td> <td>2 (one element, one pseudo-element)</td> </tr> <tr> <td class="num">5</td> <td>ul ol+li { }</td> <td>3 (three elements)</td> </tr> <tr> <td class="num">7</td> <td>ul ol li.red { }</td> <td>13 (one class, three elements)</td> </tr> <tr> <td class="num">9</td> <td>style=””</td> <td>1000 (one inline styling)</td> </tr> <tr> <td class="num">11</td> <td>div p { }</td> <td>2 (two HTML selectors)</td> </tr> <tr> <td class="num">13</td> <td>div p.sith { }</td> <td>12 (two HTML selectors and a class selector)</td> </tr> <tr> <td>15</td> <td>body #darkside .sith p { }</td> <td>112 (HTML selector, id selector, class selector, HTML selector; 1+100+10+1)</td> </tr> </tbody> </table> </p> <p><strong>实际l验Q?/strong></p> <p>1. 使用LVHA定义链接Q即link-visited-hover-activeQ参考[<a ><strong><font color="#0040b6">Link Specificity</font></strong></a>]<br /> 2. 如果不是Z兼容览器,最好不要?!important<br /> 3. 使用ID让特性更具体Q比如a.high写成 ul#blog li a.high</p> <p><strong>CSS工具与资 </strong>英文好的ȝ?/p> <p><a ><strong><font color="#0040b6">CSS Specificity for Poker Players</font></strong></a><br /> <a ><strong><font color="#0040b6">CSS specificity calculator</font></strong></a><br /> <a ><strong><font color="#0040b6">Understanding Specificity Tutorial</font></strong></a><br /> <a ><strong><font color="#0040b6">Cascade Inheritance: Specificity</font></strong></a><br /> <a ><strong><font color="#0040b6">CSS 2.1 Selectors Explained</font></strong></a><br /> <a ><strong><font color="#0040b6">CSS Specificity Bugs in IE</font></strong></a><br /> <a ><strong><font color="#0040b6">CSS Structure and Rules</font></strong></a><br /> <a ><strong><font color="#0040b6">Specificity</font></strong></a></p> <p></code></p> <img src ="http://www.aygfsteel.com/imfisher/aggbug/145381.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/imfisher/" target="_blank">愚h</a> 2007-09-15 16:10 <a href="http://www.aygfsteel.com/imfisher/archive/2007/09/15/145381.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]剖析PHP中的输出~冲http://www.aygfsteel.com/imfisher/archive/2007/09/06/143079.html愚h愚hThu, 06 Sep 2007 01:57:00 GMThttp://www.aygfsteel.com/imfisher/archive/2007/09/06/143079.htmlhttp://www.aygfsteel.com/imfisher/comments/143079.htmlhttp://www.aygfsteel.com/imfisher/archive/2007/09/06/143079.html#Feedback0http://www.aygfsteel.com/imfisher/comments/commentRss/143079.htmlhttp://www.aygfsteel.com/imfisher/services/trackbacks/143079.html我们先来看一D代码?/p>
<?php
for ($i=10; $i>0; $i--)
{
echo $i;
flush();
sleep(1);
}
?>

按照php手册里的说法

该函数将当前为止E序的所有输出发送到用户的浏览器?/p>

上面的这D代码,应该隔一U钟输出一?i。但是实际中却不一定是q样。有可能是等?0U钟后,所有的输出同时呈现出来?/p>

好,我们来改一下这D代码,Ҏ

<?php
ob_end_clean();//修改部分
for ($i=10; $i>0; $i--)
{
echo $i;
flush();
sleep(1);
}
?>

嘿,加了q一句ob_end_clean();,居然OK了。实际上Q我们把ob_end_clean()换成ob_end_flush()也一样OK?/p>

我再来改一攏V?/p>

<?php
for ($i=10; $i>0; $i--)
{
echo $i;
ob_flush();//修改部分
flush();
sleep(1);
}
?>

q行一下,是不是发?i也隔一U输Zơ了Q这是ؓ什么呢Q?br /> 别急,我们来看看php.ini?/p>

打开php.ini,搜烦output_bufferingQ我们会看到cMq样的设|?output_buffering = 4096。正如它的名字output_buffering一Pq个讄的作用就是把输出~冲一下,~冲大小?096bytes.

在我们的W一D代码里Q之所以没有按预期的输出,正是因ؓq个output_buffering把那些输出都~冲了。没辑ֈ4096bytes或者脚本结束,输出是不会被发送出ȝ?/p>

而第二段代码中的ob_end_clean()和ob_end_flush()的作用,是l止~冲。这样就不用{到?096bytes的缓冲之后才被发送出M?/p>

W三D代码中Q用了一句ob_flush(),它的作用是把缓冲的数据发送出去,但是q不会终止缓Ԍ所以它必须在每ơflush()前用?/p>

如果不想使用ob_end_clean(),ob_end_flush()和ob_flush()Q我们就必须把php.ini里的output_buffering讑־_,例如设ؓ0。需要注意的是,如果你打在脚本中用ini_set(”output_buffering”,”0″)来设|,那么请停下来吧,q种Ҏ是不行的。因为在脚本一开始的时候,~冲讄已l被载入Q然后缓冲就开始了?/p>

可能你会问了Q既然ob_flush()是把~冲的数据发送出去,那么Z么还需要用flush()???直接用下面这D代码不行吗Q?

<?php
for ($i=10; $i>0; $i--)
{
echo $i;
ob_flush();
sleep(1);
}
?>

h意ob_flush()和flush()的区别。前者是把数据从PHP的缓冲中释放出来Q后者是把不在缓冲中的或者说是被释放出来的数据发送到览器。所以当~冲存在的时候,我们必须ob_flush()和flush()同时使用?/p>

那是不是flush()在这里就是不可缺的呢?不是的,我们q有另外一U方法,使得当有数据输出的时候,马上被发送到览器。下面这两段代码是不需要用flush()了。(当你把output_buffering设ؓ0的时候,qob_flush()和ob_end_clean()都不需要了Q?/p>

<?php
ob_implicit_flush(true);
for ($i=10; $i>0; $i--)
{
echo $i;
ob_flush();
sleep(1);
}
?>
<?php
ob_end_clean();
ob_implicit_flush(true);
for ($i=10; $i>0; $i--)
{
echo $i;
sleep(1);
}
?>

h意看上面的ob_implicit_flush(true)Q这个函数强制每当有输出的时候,卛_把输出发送到览器。这样就不需要每ơ输出(echoQ后Q都用flush()来发送到览器了?/p>

以上所诉可能在某些览器中不成立。因为浏览器也有自己的规则。我是用Firefox1.5,IE6,opera8.5来测试的。其中opera׃能正常输出,因ؓ它有一个规则,是不遇C个HTML标签Q就l对不输出,除非到脚本结束。而FireFox和IEq算比较正常的?/p>

最后附上一D非常有的代码,作者ؓPuTTYshell。在一个脚本周期里Q每ơ输出,都会把前一ơ的输出覆盖掉?br /> 以下代码只在firefox下可用,其他览器ƈ不支持multipart/x-mixed-replace的Content-Type.

<?php
header('Content-type: multipart/x-mixed-replace;boundary=endofsection');
print "\n--endofsection\n";
$pmt = array("-", "\\", "|", "/" );
for( $i = 0; $i <10; $i ++ ){
sleep(1);
print "Content-type: text/plain\n\n";
print "Part $i\t".$pmt[$i % 4];
print "--endofsection\n";
ob_flush();
flush();
}
print "Content-type: text/plain\n\n";
print "The end\n";
print "--endofsection--\n";
?>


愚h 2007-09-06 09:57 发表评论
]]>
վ֩ģ壺 | Ͳ| Ϊ| | ī| Ԫ| | | | Ʊ| | | | | | | ˳| | Զ| ͩ®| | | Ϫ| ʷ| | ʯ| | | Ľ| | Ҿ| | ˶| ͼ| żҸ| | | ϰ| | пǰ| |