ÓÃcssÈÃͼƬ×Ô¶¯ÊÊÓ¦´óС
ͼƬ×Ô¶¯ÊÊÓ¦´óСµÄÎÊÌâÔÚƽʱÖÆ×÷µÄʱºòÊDZȽϳ£¼ûµÄÎÊÌ⣬ÏÂÃæÌṩһ¸ö±È½Ï¼òµ¥µÄ½â¾ö·½·¨£º
div img {
max-width:600px;
//IE7¡¢FFµÈÆäËû·ÇIEä¯ÀÀÆ÷ÏÂ×î´ó¿í¶ÈΪ600px;
width:600px;
//ËùÓÐä¯ÀÀÆ÷ÖÐͼƬµÄ´óСΪ600px;
width:expression(document.body.clientWidth>600?"600px":"auto");
//µ±Í¼Æ¬´óС´óÓÚ600px£¬×Ô¶¯ËõСΪ600px;
overflow:hidden;
}
Ïà¹ØÎĵµ£º
Html´úÂë
view plaincopy to clipboardprint?
<div style="width: 230px; border: 1px solid blue; overflow: hidden; text-overflow:ellipsis">
<nobr>¾ÍÊDZÈÈçÓÐÒ»ÐÐÎÄ×Ö£¬ºÜ³¤£¬±í¸ñÄÚÒ»ÐÐÏÔÊ ......
cssµÄdl dt ddµÄÓ¦Óãº
<!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= ......
±ß¿ò·ç¸ñÊôÐÔ(border-style)
Õâ¸öÊôÐÔÓÃÀ´É趨ÉÏÏÂ×óÓұ߿òµÄ·ç¸ñ£¬ËüµÄÖµÈçÏ£º
none (ûÓб߿ò£¬ÎÞÂ۱߿ò¿í¶ÈÉèΪ¶à´ó)
dotted (µãÏßʽ±ß¿ò)
dashed (ÆÆÕÛÏßʽ±ß¿ò)
solid (Ö±Ïßʽ±ß¿ò)
double (Ë«Ïßʽ±ß¿ò)
groove (²ÛÏßʽ±ß¿ò)
ridge(¼¹Ïßʽ±ß¿ò)
inset (ÄÚǶЧ¹ûµÄ±ß¿ò)
outset (Í»ÆðЧ¹ûµÄ±ß¿ò)
± ......