摘要: 设置css样式时,相信你遇到过 自己想设置的那个css的优先级比自己不想用的那个css的优先级低,怎么办呢,其实很简单,加个!important就ok了.redFont {color:red !important; }这就表示redFont这个样式的优先级为最高,但没事不建议这么做,如果以后你想改css的话 你就蛋疼了 阅读全文
posted @ 2013-03-05 15:52 程序有Bug 阅读(15362) 评论(0) 推荐(0) 编辑
摘要: 通过css控制超出部分变成...比通过javascript截取字符串效率要高得多而且也更简单 不多说,看例子<html> <body> <style> .ellipsis span { white-space:nowrap; text-overflow:ellipsis; /* for internet explorer */ overflow:hidden; width:190px; display:block; } html>body .ellipsis { clear:both; } html>body .ellipsis span:aft 阅读全文
posted @ 2013-03-05 15:48 程序有Bug 阅读(1545) 评论(0) 推荐(0) 编辑