CSS IE6+¡¢FF¼æÈÝ Í¼Æ¬´óС×ÔÊÊÓ¦
CSS´úÂëÈçÏ£º
img { /*-- רÃÅÓÃÓÚÏÞ¶¨ÎÄÕÂDIVϵÄͼƬ --*/
max-width: 680px;
max-height: 700px;
}
*html img { /*¼æÈÝIE6*/
width: expression(this.width > 700 && this.width > this.height ? 680 : true);
height: expression(this.height > 700 || this.height > this.width ? 700 : true);
}
Ïà¹ØÎĵµ£º
ºÐ×Ó±êÇ©ºÍÊôÐÔ¶ÔÕÕ
CSSÓï·¨£¨²»Çø·Ö´óСд£©
JavaScriptÓï·¨£¨Çø·Ö´óСд£©
border
border
border-bottom
borderBottom
border-bottom-color
borderBottomColor
border-bottom-style
borderBottomStyle
border-bottom-width
borderBottomWidth
border-color
borderColor
border-left
borderLeft
border ......
JavaScript´úÂë
<mce:script type="text/javascript"><!--
function imageOver(e) {
e.style.border="1px solid red";
}
function imageOut(e) {
e.style.borderWidth=0;
}
// --></mce:script>
<img src="phplamp.gif" onmouseover="imageOver(this)" onmo ......
ͼƬ×Ô¶¯ÊÊÓ¦´óСµÄÎÊÌâÔÚÆ½Ê±ÖÆ×÷µÄʱºòÊDZȽϳ£¼ûµÄÎÊÌ⣬ÏÂÃæÌṩһ¸ö±È½Ï¼òµ¥µÄ½â¾ö·½·¨£º
div img {
max-width:600px;
//IE7¡¢FFµÈÆäËû·ÇIEä¯ÀÀÆ÷ÏÂ×î´ó¿í¶ÈΪ600px;
width:600px;
//ËùÓÐä¯ÀÀÆ÷ÖÐͼƬµÄ´óСΪ600px;
width:expression(document.body.clientWidth>600?"600px":"auto");
//µ±Í¼Æ¬´óС´óÓÚ6 ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JS+CSSÏà²áչʾ&l ......
CSS¼òд¾ÍÊÇÖ¸½«¶àÐеÄCSSÊôÐÔÉùÃ÷»¯³ÉÒ»ÐУ¬ÓÖ³ÆÎªCSS´úÂëÓÅ»¯¡£CSS¼òдµÄ×î´óºÃ´¦¾ÍÊÇÄܹ»ÏÔ׿õÉÙCSSÎļþµÄ´óС£¬Æäʵ»¹ÓкܶàÆäËûÒæ´¦¡£Ó·Ö×¶øÔÓÂÒµÄCSSÑùʽ±í»áʹÄãÓöµ½ÎÊÌâÊÇÄÑÒÔµ÷ÊÔ¡£ÓÈÆäÊǵ±Ò»¸öÍŶÓÔÚ½øÐÐÉè¼ÆµÄʱºò£¬ÄãµÄÓ·Ö×µÄCSS´úÂë»áʹÄãµÄÍŶӯäËû³ÉÔ±µÄ¹¤×÷ЧÂÊϽµ¡£
¡¡¡¡½ñÌ죬ÕûÀíÁËһЩCSS¼òд¼¼Ç ......