1.alphaÊôÐÔ:
alphaÊôÐÔÓÃÀ´ÉèÖÃ͸Ã÷¶È¡£
Filter: alpha (opacity=opacity, finishopacity=finishopacity,style=style,startX=startX,startY=startY,finishX=finishX,finishY=finishY)
opacity±íʾ͸Ã÷¶ÈµÈ¼¶£¨0~100£©
finishopacityÓÃÀ´ÉèÖýáÊøÃ÷µÄ͸Ã÷¶È
startXºÍstartY±íʾ½¥±ä͸Ã÷Ч¹ûµÄ¿ªÊ¼×ø±ê
finishXºÍfinishY±íʾ½¥±ä͸Ã÷Ч¹ûµÄ¿ªÊ¼×ø±ê
2.blurÊôÐÔ
blurÊôÐÔÓÃÀ´ÉèÖÃÄ£ºýЧ¹û¡£
filter: blur(add=true¡¢flase,direction,strength=strength)
addÖ¸¶¨Í¼Æ¬ÊÇ·ñ±ä³ÉÄ£ºýЧ¹û
direction²ÎÊýÓÃÀ´ÉèÖÃÄ£ºýµÄ·½Ïò£¨0¡¢45¡¢90¡¢135¡¢180¡¢225¡¢270¡¢315£©
strength´ú±íÓжàÉÙÏñËصĿí¶È½«Êܵ½Ä£ºýÓ°Ï죨ĬÈÏÊÇ5£©
3.chromaÊôÐÔ
chromaÊôÐÔÉèÖÃÒ»¸ö¶ÔÏóÖÐÖ¸¶¨µÄÑÕɫΪ͸Ã÷É«¡£
filter: chroma(color=color)
4.dropshadowÊôÐÔ
dropshadowÊôÐÔÓÃÀ´Ìí¼Ó¶ÔÏóµÄÒõӰЧ¹û¡£
filter: dropShadow(Color=color,Offx=offx,Offy=offy,Positive=positive)
Color±íʾͶÉäÒõÓ°µÄÑÕÉ«
Offx¡¢Offy·Ö±ð±íʾÔÚX·½ÏòºÍY·½ÏòÒõÓ°µÄÆ«ÒÆÁ¿£¨ÕûÊý±íʾ ......
ÓÉÓÚ¸÷ä¯ÀÀÆ÷µÄĬÈÏCSSÑùʽ²»Ò»Ñù£¬ÎÒÃDZØÐëдһ¸öCSS ResetͳһÆðÀ´¡£
ͨ³£ÎÒµÄ×ö·¨ÊÇÔÚcommon.cssÀïдȫ¾Ö¿ØÖÆ£¬ÕâÀïÃæÒ²°üÀ¨headerºÍfooter£¬ÆäËüCSSÎļþ¾Íͨ¹ý@import url(”common.css”);ÒýÓá£
body{padding:10px;margin:0;background:#fff;font-size:12px;line-height:14px;color:#333;font-family:Arial;}
form,ul,ol,h1,h2,h3,h4,h5,h6,p{margin:0;padding:0;list-style:none;}
input,textarea,select,button{font-size:12px;}
img{border:none;}
address,cite,small{color:#999;font-style:normal;font-size:12px;}
a{color:#09c;text-decoration:none;}
a:hover{text-decoration:underline;}
#header{...}
#footer{...} ......
png͸Ã÷ AlphaImageLoader
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=bEnabled,sizingMethod=sSize,src=sURL)
enabled£º¿ÉÑ¡Ïî¡£²¼¶ûÖµ(Boolean)¡£ÉèÖûò¼ìË÷Â˾µÊÇ·ñ¼¤»î¡£true£ºÄ¬ÈÏÖµ¡£Â˾µ¼¤»î¡£false£ºÂ˾µ±»½ûÖ¹¡£
sizingMethod£º¿ÉÑ¡Ïî¡£×Ö·û´®(String)¡£ÉèÖûò¼ìË÷Â˾µ×÷ÓõĶÔÏóµÄͼƬÔÚ¶ÔÏóÈÝÆ÷±ß½çÄÚµÄÏÔʾ·½Ê½¡£crop£º¼ôÇÐͼƬÒÔÊÊÓ¦¶ÔÏó³ß´ç¡£image£ºÄ¬ÈÏÖµ¡£Ôö´ó»ò¼õС¶ÔÏóµÄ³ß´ç±ß½çÒÔÊÊӦͼƬµÄ³ß´ç¡£scale£ºËõ·ÅͼƬÒÔÊÊÓ¦¶ÔÏóµÄ³ß´ç±ß½ç¡£
src£º±ØÑ¡Ïî¡£×Ö·û´®(String)¡£Ê¹Óþø¶Ô»òÏà¶Ô url µØÖ·Ö¸¶¨±³¾°Í¼Ïñ¡£¼ÙÈçºöÂԴ˲ÎÊý£¬Â˾µ½«²»»á×÷Óá£
firefox²»ÄܶÔinnerTextÖ§³Ö
firefoxÖ§³ÖinnerHTMLµ«È´²»Ö§³Ö innerText£¬ËüÖ§³ÖtextContentÀ´ÊµÏÖinnerText£¬²»¹ýĬÈϰѶàÓàµÄ¿Õ¸ñÒ²±£ÁôÁË¡£Èç¹û²»ÓÃtextContent£¬Èç¹û×Ö·û´®ÀïÃæ²»°üº¬HTML´úÂëÒ²¿ÉÒÔÓÃinnerHTML´úÌæ¡£
½ûֹѡȡÍøÒ³ÄÚÈÝ
ÔÚIEÖÐÒ»°ãÓÃjs£ºobj.onselectstart=function() {return false;}
¶øfirefoxÓÃCSS:-moz-user-select:none
Â˾µµÄÖ§³Ö(Àý£ºÍ¸Ã÷Â˾µ)
IE:filter£ºalpha(opacity=10);
firefox£º-moz- opacity:.10;
²¶»ñʼþ
IE£ºobj.setCapture() ¡ ......
µ±Á¬ÐøÊäÈëÓ¢Óï×Ö·ûºó£¬ÓÉÓÚä¯ÀÀÆ÷ĬÈÏΪһ¸öµ¥´Ê£¬²¢²»»á»»Ðд¦Àí£¬ÔÚIE6/IE7 ÖУ¬ÎÒÃÇ¿ÉÒÔÌí¼ÓcssÖеÄword-wrap ÊôÐÔ£¬ÊµÏÖ×Ô¶¯»»ÐС£µ«ÊÇÔÚIE8 °æ±¾ÖУ¬¸ÃÊôÐÔ²»Ö§³Ö¡£
ÎÒÃÇ¿ÉÒÔ²ÉÓÃÅжÏä¯ÀÀÆ÷°æ±¾ºó£¬Ê¹ÓÃJavaScript½øÐл»ÐС£
if ($.browser.mozilla) {
strContent = toBreakWord(strContent, 87);
}else if($.browser.msie&&($.browser.version == "8.0")){
strContent = toBreakWord(strContent, 87);
}
»»Ðд¦ÀíµÄº¯ÊýΪ£º
// ͨ¹ýJavaScriptʵÏÖÓ¢Îij¤×Ö·û´®»»ÐÐ
function toBreakWord(content, intLen) {
var strContent = content;
var strTemp = "";
while (strContent.length > intLen) {
strTemp += strContent.substr(0, intLen) + " ";
strContent = strContent.substr(intLen, strContent.length);
}
strTemp += " " + strContent;
return strTemp;
}
ÆäÖУ¬contentΪÐèÒª»»Ðд¦ÀíµÄ×Ö·û´®£¬in ......
µÚÒ»ÖÖ£¬ÊÇCSS HACKµÄ·½·¨
height:20px; /*For Firefox*/
*height:25px; /*For IE7 & IE6*/
_height:20px; /*For IE6*/
×¢Òâ˳Ðò¡£
ÕâÑùÒ²ÊôÓÚCSS HACK£¬²»¹ýûÓÐÉÏÃæÕâÑù¼ò½à¡£
#example { color: #333; } /* Moz */
* html #example { color: #666; } /* IE6 */
*+html #example { color: #999; } /* IE7 */
µÚ¶þÖÖÊÇʹÓÃIEרÓõÄÌõ¼þ×¢ÊÍ
<!-- ÆäËûä¯ÀÀÆ÷ -->
<link rel="stylesheet" type="text/css" href="css.css" />
<!--[if IE 7]>
<!-- ÊʺÏÓÚIE7 -->
<link rel="stylesheet" type="text/css" href="ie7.css" />
< ![endif]-->
<!--[if lte IE 6]>
<!-- ÊʺÏÓÚIE6¼°Ò»Ï -->
<link rel="stylesheet" type="text/css" href="ie.css" />
< ![endif]-->
µÚÈýÖÖcss filterµÄ°ì·¨£¬ÒÔÏÂΪ¾µä´Ó¹úÍâÍøÕ¾·Òë¹ýÀ´µÄ¡£
н¨Ò»¸öcssÑùʽÈçÏ£º
#item {
width: 200px;
height: 200px;
background: red;
}
н¨Ò»¸ödiv,²¢Ê¹ÓÃÇ°Ã涨ÒåµÄcssµÄÑùʽ£º
<div id="item">some text here</div>
ÔÚbody±íÏÖÕâÀï¼ÓÈëlangÊôÐÔ,ÖÐÎÄΪzh£º
<body lang="en">
ÏÖÔÚ¶Ôdi ......
ºÜÔç¾ÍÔÚÕâÀï¿´µ½¹ý½â¾ö·½°¸£¬Óëà»à»ÌÖÂÛºó·¢ÏÖÕâ¸ö·½°¸»¹ÊǺܿɿ¿µÄ¡£µ±È»£¬Î¨Ò»µÄȱµã¾ÍÊÇÿһ¸öÊôÐÔ¶¼ÒªÈ¥Hack£¬µ«ÎÒÔںܶàʵ¼ùÖУ¬Ö»ÓÑÐÞÕý’1-2¸öÊôÐԾͿÉÒÔÁË¡£
¾ßÌåд·¨ºÜÈÝÒ×£º
#someNode
{
position: fixed;
#position: fixed;
_position: fixed;
}
µÚһşøFirefoxÒÔ¼°ÆäËûä¯ÀÀÆ÷¿´
µÚ¶þÅŸøIE7£¨¿ÉÄÜÒÔºóµÄIE8¡¢IE9Ò²ÊÇÈç´Ë£¬ËÖªµÀÄØ£©¿´
µÚÈýÅŸøIE6ÒÔ¼°¸üÀϵİ汾¿´
×îºÃµÄÓ¦ÓþÍÊÇ¿ÉÒÔÈÃIE6Ò²“Ö§³Ö”position:fixed£¬¶øÇÒ£¬ÅäºÏÕâ¸öÔÀí£¬¿ÉÒÔ×öµ½²»ÒýÈëJavaScript´úÂ루½öÓÃIE6µÄexpression£©£¬ÎÒÕâÀïÓÐÒ»¸öÏֳɵÄÒ³Ã棬CSSÈçÏÂд£º
#ff-r
{
position: fixed;
_position: absolute;
right: 15px;
top: 15px;
_top: expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat') ?
documentElement.scrollTop+15 :
document.body.scrollTop +
(document.body.clientHeight
-this.clientHeight));
}
ÊDz»ÊǺܷ½±ã£º£©
±¾ÎÄÀ´×Ô£ºhttp://www.awflasher.com/blog/archives/1080
......