????æå±ä¸æ :å端åªå åå¤å°ä¹è·¯
????ä½è ç®ä»:rchjrââäºå¸¦ä¿¡ç®¡èåªå ä¸æ
????åè¨:该系åå°æç»æ´æ°å端çç¸å ³å¦ä¹ ç¬è®°,欢è¿åæä¸æ ·çå°ç½è®¢é ,ä¸èµ·å¦ä¹ å ±åè¿æ¥~
????æç« ç®ä»:æ¬æä»ç»CSSçç¨æ·çé¢æ ·å¼ãç¥è¯å¦ä¹ å 容æ¥èªbç«ç@é»é©¬ç¨åºåçè§é¢
 CSSçvertical-alginå±æ§ç使ç¨åºæ¯:设置å¾çæè 表å(è¡å åå ç´ )åæåçåç´å¯¹é½ãå®åªé对è¡å å ç´ æè è¡å åå ç´ ææã
è¯æ³
vertical-align:baseline | top | middle | bottom
å¼ | æè¿° |
baselin | é»è®¤,å ç´ æ¾å¨ç¶å ç´ çåºçº¿ä¸ |
top | æå ç´ ç顶端ä¸è¡ä¸æé«å ç´ çé¡¶ç«¯å¯¹é½ |
middle | ææ¤å ç´ æ¾ç½®å¨ç¶å ç´ çä¸é¨ |
bottom | æå ç´ ç顶端ä¸è¡ä¸æä½çå ç´ çé¡¶ç«¯å¯¹é½ |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
img {
vertical-align: middle;
}
</style>
<body>
<img src="libai.jpg" alt="">æç½
</body>
</html>
 è¿æ¶æ¯å± ä¸å¯¹é½(ä¸ä¸çº¿å¯¹é½)
æ常ç¨çæ¯ä¸ä¸çº¿å¯¹é½ãåæ¶éè¿ç»å¾çæ·»å ä¸é¢çå±æ§,è¿å¯ä»¥è§£å³å¾çåºé¨åå¨çé»è®¤ç©ºç½ç¼éã
åè¡æå溢åºæ¾ç¤ºçç¥å·
满足æ¡ä»¶
1.å 强å¶ä¸è¡å æ¾ç¤ºææ¬:white-space:nowrap
2.è¶ åºçé¨åéè½:overflow:hidden
3.æåç¨çç¥å·æ¿ä»£è¶ åºçé¨å:text-overflow:ellipsis
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
div {
width: 150px;
height: 50px;
background-color: pink;
/* 强å¶ä¸è¡ */
white-space: nowrap;
/* 溢åºé¨åä¸æ¾ç¤º */
overflow: hidden;
/* ç¨çç¥å· */
text-overflow: ellipsis;
}
</style>
</head>
<body>
<div>
æ¤å¤çç¥1111111111111å
</div>
</body>
</html>