2009/10/29 17:59
在蓝色经典看到的,转过来以作备用。
CSS命名规则
一.文件命名规范
全局样式:global.css;
框架布局:layout.css;
字体样式:font.css;
链接样式:link.css;
打印样式:print.css;
CSS命名规则
一.文件命名规范
全局样式:global.css;
框架布局:layout.css;
字体样式:font.css;
链接样式:link.css;
打印样式:print.css;
2009/08/01 09:49
对于做网站的同志们来说,有一个东西很简单,也很必要,比如在文章里插入图片,如果图片大小合适倒没什么,但要是尺寸超过了文章区域的宽度,就会出汗了...那么如何才能控制图片的大小呢?当然我们可以直接用JS,但这样未免有些麻烦,CSS中的expression()给我们提供了一个捷径.
只用一行代码,我们即可实现轻松控制图片大小:
img{ width: expression( ( this.width > 300) ? 300 : this.width ); }
这样一来,图片的宽就被限制在了300以内.不过FireFox可不吃这套...但是更简单,只需要加一个max-width即可,综合起来写法如下:
img
{
max-width: 200px;
width: expression( ( this.width > 300) ? 300 : this.width );
}
这样,一个兼容IE与FF(Firefox)的图片自动缩放的CSS就搞定了!是不是很简单哈?
只用一行代码,我们即可实现轻松控制图片大小:
img{ width: expression( ( this.width > 300) ? 300 : this.width ); }
这样一来,图片的宽就被限制在了300以内.不过FireFox可不吃这套...但是更简单,只需要加一个max-width即可,综合起来写法如下:
img
{
max-width: 200px;
width: expression( ( this.width > 300) ? 300 : this.width );
}
这样,一个兼容IE与FF(Firefox)的图片自动缩放的CSS就搞定了!是不是很简单哈?
2009/06/13 11:55
1.Firebug
官网下载:http://getfirebug.com/
2.IE Developer Toolbar —— Like Firebug (DOM/CSS etc)
http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038
3.debugbar
官网下载:http://www.debugbar.com/
4.ie tester
官网下载:http://www.my-debugbar.com/wiki/IETester/HomePage
5.HttpWatch
官网下载:http://httpwatch.com/download/
官网下载:http://getfirebug.com/
2.IE Developer Toolbar —— Like Firebug (DOM/CSS etc)
http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038
3.debugbar
官网下载:http://www.debugbar.com/
4.ie tester
官网下载:http://www.my-debugbar.com/wiki/IETester/HomePage
5.HttpWatch
官网下载:http://httpwatch.com/download/
2009/06/11 14:57
- 屏蔽IE浏览器(也就是IE下不显示)
- *:lang(zh) select {font:12px !important;} /*FF,OP可见,特别提醒:由于Opera最近的升级,目前此句只为FF所识别*/
select:empty {font:12px !important;} /*safari可见*/
这里select是选择符,根据情况更换。第二句是MAC上safari浏览器独有的。 - 仅IE7与IE5.0可以识别
- *+html select {…}
当面临需要只针对IE7与IE5.0做样式的时候就可以采用这个HACK。 - 仅IE7可以识别
- *+html select {…!important;}
当面临需要只针对IE7做样式的时候就可以采用这个HACK。 - IE6及IE6以下识别
2009/06/11 14:22
区别IE6与FF:
background:orange;*background:blue;
区别IE6与IE7:
background:green !important;background:blue;
区别IE7与FF:
background:orange; *background:green;
区别FF,IE7,IE6:
background:orange;*background:green !important;*background:blue;
background:orange;*background:blue;
区别IE6与IE7:
background:green !important;background:blue;
区别IE7与FF:
background:orange; *background:green;
区别FF,IE7,IE6:
background:orange;*background:green !important;*background:blue;





