課程
/前端開發(fā)
/HTML/CSS
/CSS深入理解之line-height
? ? 在你的博客上嗎?? ? ? ? ?
2019-04-23
源自:CSS深入理解之line-height 3-1
正在回答
在視頻的圖上有呀
老師沒有上傳,我自己寫了一份,僅供參考
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.box{
background: yellow;
border: 1px solid red;
position: absolute;
padding: 10px;
text-align: center;
}
.txt{
display: inline-block;
font-size: 240px;
line-height: 360px;
font-family: "微軟雅黑";
background:white;
border: 1px solid black;
</style>
</head>
<body>
<div class="box">
<span class="txt">sphinx</span>
</div>
</body>
</html>
舉報
帶領(lǐng)大家深入理解line-height的定義,還有實際應(yīng)用經(jīng)驗分享
2 回答如果display:block 的話,高度是不不是內(nèi)容區(qū)域的高度呢?
1 回答請問審查元素里怎么查看content area(內(nèi)容區(qū)域的)?
1 回答老師講的很好 ,我想知道這些深度的知識在哪里能看到呢
2 回答內(nèi)聯(lián)元素的高度是由行高決定的&&高度的表現(xiàn)不是行高 是否矛盾? 為什么line-height是由文本間的基線來計算的,但是單行文本卻有l(wèi)ine-height
1 回答匹配20px,宋體font-size等于內(nèi)容區(qū)域高度
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2019-06-18
在視頻的圖上有呀
老師沒有上傳,我自己寫了一份,僅供參考
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.box{
background: yellow;
border: 1px solid red;
position: absolute;
padding: 10px;
text-align: center;
}
.txt{
display: inline-block;
font-size: 240px;
line-height: 360px;
font-family: "微軟雅黑";
background:white;
border: 1px solid black;
}
</style>
</head>
<body>
<div class="box">
<span class="txt">sphinx</span>
</div>
</body>
</html>