CSS Hack
只针对ie6,ie7和firefox的csshack
注意都要写在正常样式的后边,除!important方法在前边
---------------针对样式名------------
如果只让ie6看见用*html .head{color:#000;}
如果只让ie7看见用*+html .head{color:#000;}
如果只让ff看见用:root body .head{color:#000;}
如果只让ff、IE8看见用html>/**/body .head{color:#000;}
如果只是不让ie6看见用html>body .head{color:#000;} 即对IE 6无效
如果只是不让ff、IE8看见用*body .head{color:#000;} 即对ff、IE8无效
body>.head{color:#000} IE7 8 ff 有效
-------------针对具体属性--------------
如果只让ie6看见用_ .head{_color:#000;}
如果只让ie7看见用+与_结合的方法: .head{+color:#f00;!;_color:#000;}
如果只是不让ie6看见用 /**/ .head{color /**/:#000;}注意有空格,或者用!important,写法: width:20px!important; width:50px;
如果只对ff无效/9 >.head{color:#000\9}
--------------------------------------------------IE8正式版hack---------------------------------
"\9" 例:"margin:0px auto\9;".这里的"\9"可以区别所有IE和FireFox.
"*" IE6、IE7可以识别.IE8、FireFox不能.
"_" IE6可以识别"_",IE7、IE8、FireFox不能.
如:.a {color:#f00; color:#f60\9; +color:#00FF00; _color:#0000FF; }
ff IE8 IE7 IE6
相关文档:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>CSS选项卡效果代码演示</title>
</head>
<body>
<mce:style type="text/css"><!--
div.card div{
background-color:#FF8 ......
效果如下:
前台代码:
<div id="Men">
<a href ="addnewbooks.aspx" target="_blank"><span class="left"></span>增加新书<span class="right"></span></a>
&nb ......
宽度自适应的div+css的BOX
参考:
http://space.cnblogs.com/group/topic/3617/
http://www.dynamicdrive.com/style/layouts/item/css-left-and-right-frames-layout/ 一、效果: 二、素材: 三、代码: <style type="text/css">
.box{}
.box .box_tit{position:rela ......
2009-10-20 13:30:21
简写CSS一直被我忘记,没办法就搜了点资料,记录如下:
font
简写:
font:italic small-caps bold 12px/1.5em arial,verdana;
等效于:
font-style:italic;font-variant:small-caps;font-weight:bold;font-size:12px;line-height:1.5em;font-family:arial,verdana;
顺序:font-style | font-var ......