我的文本位于 div
的底部,但它需要位于 div
的顶部。
我的 CSS 代码:
#pagetitle
{
float: left;
width: 472px;
height: 109px;
font-size: 80px;
font-family: 'CodePro';
padding: 0px;
margin: 0px;
}
html, body{
margin:0 !important;
padding:0 !important;
opacity: 0.99;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
background-color: #cfcfcf;
}
实时预览位于 link
最佳答案
试试这个:
#pagetitle
{
line-height: 23px; /* or so, it depends on your need*/
}
关于css - div 中的文本自动移至底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14325032/