Css ͬ±ÈÀýËõСͼƬ
/*¿ØÖÆÍ¼Æ¬µÄ´óС*/
.contentimg{
max-width:600px;
/*max-height:100px;*/
}
*html.contentimg{
width:expression(this.width>50&&this.width>this.height?60:auto);
/*height:expresion(this.height>50?50:auto);
*/
}
µ÷ÓÃ
$("#"+id.substring(0,id.length-5)+"arCon").html(msg);
$("div.arCon img").each(function(){
$(this).addClass("contentimg");
});
Ïà¹ØÎĵµ£º
ÏÈÀ´¿´ÏÂposition¸÷ÊôÐԵĽâÊÍ
absolute
: Éú³É¾ø¶Ô¶¨Î»µÄÔªËØ£¬Ïà¶ÔÓÚ static ¶¨Î»ÒÔÍâµÄµÚÒ»¸ö¸¸ÔªËؽøÐж¨Î»¡£
ÔªËØµÄλÖÃͨ¹ý "left", "top", "right" ÒÔ¼° "bottom&q ......
/* ½ûÖ¹»»ÐÐ */
.nowrap{word-break:keep-all;white-space:nowrap;}
/* Ç¿ÖÆ»»ÐÐ */
.break{word-break:break-all;}
cssÇ¿ÖÆ²»»»ÐÐ
div{white-space:nowrap;}
css×Ô¶¯»»ÐÐ
div{ word-wrap: break-word; word-break: normal; }
cssÇ¿ÖÆÓ¢Îĵ¥´Ê¶ÏÐÐ
div{word-break:break-all;}
´ó¼Ò¶¼ÖªµÀÁ¬ÐøµÄÓ¢ÎÄ»òÊý×Ö»á°ÑDIV ......
CSS£¬²ãµþÑùʽ±íµÄ×÷ÓÃÊÇʲô£¿ÎÒÃÇÏÈͨ¹ýÒ»¸öÀý×ÓÀ´Ìå»áһϣº
¿´´úÂ룺
index.html
<!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=" ......
1¡¢ÈýÖÖ²»Í¬µÄÑùʽ±í
Ñùʽ±í¸ù¾ÝÆäÊéдλÖò»Í¬£¬¹²·ÖΪÈýÖÖ£º
ÄÚÁªÑùʽ±í£¨inline£©£º¸ÃÑùʽ±íдÔÚ±êÇ©µÄstyleÊôÐÔÀ¸ºÔðÉèÖõ±Ç°±êÇ©µÄÑùʽ£»
ÄÚ²¿Ñùʽ±í£¨inner£©£º¸ÃÑùʽ±íÒ»°ãдÔÚhead±êÇ©µÄstyle±êÇ©Àͨ¹ýÑ¡ÔñÆ÷À´Ö¸¶¨Ä³¸öÑùʽËùÓ°ÏìµÄ±êÇ©£»
ÍⲿÑùʽ±í£¨external£©£º¸ÃÑùʽ±íÒ»°ãдÔÚ¶ÀÁ¢µÄ*.cssÎļþÀï£¬Í ......
cssĬÈϵIJ¼¾ÖÊǽ«ÔªËØÒ»¸öÒ»¸öµØÍùÏÂÅÅÁÐÏÂÀ´£¬Èç¹û²»²ÉÈ¡¸¡¶¯£¬½«µ¼ÖÂÒ³Ãæ·Ç³£³¤¡£
ÏÂÃæÎÒÃÇͨ¹ý×öÒ»¸ö³£¼ûµÄÍøÕ¾²¼¾Ö£¬À´ËµÃ÷¸¡¶¯ÊÇÔõôһ»ØÊ¡£
Ï£ÍûµÄЧ¹ûÊÇ:
²½ÖèÒ»¡¢ÏȰѴúÂëдһÏ£¬
Àý£º
htmlÄÚÈÝ£º
<body >
<div id="head">
head
</div>
<div id="content">
c ......