如何讓這里的文字靠下?(補(bǔ)充:我的意思是說,讓Li里的文字靠近下邊線--->border-bottom:1px dotted #ccc),現(xiàn)在下邊線和文字中間有空隙
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>寬度和高度</title>
<style type="text/css">
li{
? ? border-bottom:1px dotted #ccc;
? ? width:200px;
? ? height:30px;
}
</style>
</head>
<body>
<ul>
? ? <li>別讓不會(huì)說話害了你</li>
? ? <li>二十七八歲就應(yīng)該有的見識(shí)</li>
? ? <li>別讓不好意思害了你</li>
</ul>
</body>
</html>
2016-06-26
我剛看了好像改不了,不知道是有bottom默認(rèn)值還是什么的,但是為了美觀,你可以試試加一個(gè)padding-top的值~
2016-06-23
li{
? ? border:1px dotted #ccc;
? ? width:200px;
? ? height:30px;
? ? line-height:30px;
}
設(shè)置line-height可以實(shí)現(xiàn)
2016-06-13
只需將li的高度height,適當(dāng)調(diào)小即可。我試了一下20px挺合適的。
li{
? ? border-bottom:2px dotted #ccc;
? ? width:200px;
? ? height:20px;
}
2016-06-13
<style type="text/css">
ul{
? ? position:absolute;
? ? bottom:0px;
}
li{
? ? border-bottom:1px dotted #ccc;
? ? width:200px;
? ? height:30px;
}
</style>
2016-06-13
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>寬度和高度</title>
<style type="text/css">
li{
? ? border-bottom:1px dotted #ccc;
? ? width:200px;
? ? height:30px;
}
<!--以下為新增代碼-->
ul{
? ? position:absolute;
? ? bottom:0px;
}
</style>
</head>
<body>
<ul>
? ? <li>別讓不會(huì)說話害了你</li>
? ? <li>二十七八歲就應(yīng)該有的見識(shí)</li>
? ? <li>別讓不好意思害了你</li>
</ul>
</body>
</html>
2016-06-13
text-align:bottom;
2016-06-13
沒有看懂你的問題,所以抱歉我不能給出答案。