lalolab.com
域名年龄: 12年2个月4天HTTP/1.1 200 OK 服务器:nginx 访问时间:2015年09月08日 18:37:00 类型:text/html Transfer-Encoding: chunked 连接:关闭 动作:Accept-Encoding 过期时间:2015年09月08日 18:36:59 缓存控制:不缓存 Content-Encoding: gzip
MAKE SOFTWARE FOR WEB,IPHONE,IPAD 使用CSS实现溢出文本显示省略号 with one comment text-overflow是一个比较特殊的样式,我们可以用它代替我们通常所用的标题截取函数,而且这样做对搜索引擎更加友好,如:标题文件有50个汉字,而我们的列表可能只有300px的宽度。如果用标题截取函数,则标题不是完整的,如果我们用CSS样式text-overflow:ellipsis,输出的标题是完整的,只是受容器大小的局限不显示出来罢了。 text-overflow在CSS手册中,这个属性是这样定义的: 语法:text-overflow : clip | ellipsis 参数: clip : 不显示省略标记(…),而是简单的裁切(clip这个参数是不常用的!) ellipsis : 当对象内文本溢出时显示省略标记(…) 说明: 设置或检索是否使用一个省略标记(…)标示对象内文本的溢出。 请您注意,text-overflow:ellipsis属性在FF中是没有效果的。 示例: div { text-overflow : clip; } text-overflow属性仅是注解,当文本溢出时是否显示省略标记。并不具备其它的样式属性定义。我们想要实现溢出时产生省略号的效果。还必须定义:强制文本在一行内显示(white-space:nowrap)及溢出内容为隐藏(overflow:hidden)。只有这样才能实现溢出文本显示省略号的效果。 例如: .sample { overflow:hidden; text-overflow:ellipsis; -o-text-overflow: ellipsis; white-space:nowrap; } -o-text-overflow 样式表示在opera浏览器中显示省略号。 Written by lalo 八月 3rd, 2011 at 2:07 上午 Posted in HTML Flex4中产生动画特效过程的两种方式 with 3 comments State 只是定义了不同的状态,Wipe只是定义了特效的类型。两者都没有定义产生特效的中间变化过程,也就是动画效果。如果要产生动画变化的恶过程,Flex4有两种方法:一种是 Transition,一种使用Wipe组件的play方法。 Read the rest of this entry » Written by lalo 四月 24th, 2011 at 5:47 上午 Posted in Flash/Flex Tagged with Flex 在PHP中使用getcwd() 函数 without comments 定义和用法 getcwd() 函数返回当前目录。 若成功,则返回当前工作目录,否则返回 false。 例子 <?php echo getcwd(); ?> 输出: C:\testweb\main Written by lalo 三月 29th, 2011 at 7:09 上午 Posted in PHP Tagged with php 通过PHP获取内存信息 with one comment 通过侦测脚本的内存使用情况,有利于代码的优化。PHP 提供了一个垃圾收集器和一个非常复杂的内存管理器。脚本执行时所使用的内存量,有升有跌。为了得到当前的内存使用情况,我们可以使用 memory_get_usage() 函数。如果需要获得任意时间点的最高内存使用量,则可以使用 memory_limit() 函数。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 echo "Initial: ".memory_get_usage()." bytes \n"; /* prints Initial: 361400 bytes */ // let's use up some memory for ($i = 0; $i < 100000; $i++) { $array []= md5($i); } // let's remove half of the array for ($i = 0; $i < 100000; $i++) { unset($array[$i]); } echo "Final: ".memory_get_usage()." bytes \n"; /* prints Final: 885912 bytes */ echo "Peak: ".memory_get_peak_usage()." bytes \n"; /* prints Peak: 13687072 bytes */ Written by lalo 三月 22nd, 2011 at 1:04 上午 Posted in PHP 使用func_get_args()函数 without comments PHP 允许定义可选参数的函数。但也有完全允许任意数目的函数参数的方法。以下是可选参数的例子: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 // function with 2 optional arguments function foo($arg1 = '', $arg2 = '') { echo "arg1: $arg1\n"; echo "arg2: $arg2\n"; } foo('hello','world'); /* prints: arg1: hello arg2: world */ foo(); /* prints: arg1: arg2: */ 现在让我们看看如何建立能够接受任何参数数目的函数。这一次需要使用 func_get_args() 函数: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 // yes, the argument list can be empty function foo() { // returns an array of all passed arguments $args = func_get_args(); foreach ($args as $k => $v) { echo "arg".($
© 2010 - 2020 网站综合信息查询 同IP网站查询 相关类似网站查询 网站备案查询网站地图 最新查询 最近更新 优秀网站 热门网站 全部网站 同IP查询 备案查询
2025-06-02 14:55, Process in 0.0097 second.