如何将文本“欢迎来到我的投资组合”上移?
这是我的代码:
.title4 {
text-align:middle;
font-family:'Roboto', sans-serif;
color:white;
font-size:45pt;
font-size:2.5em;
text-align:center;
margin: 0;
}
.part1{
margin-top:120px;
}
.part2{
margin-top:10px;
}
您是否尝试降低的margin-top
价值.part1
?
你应该把<h1>
,<h1>
里面的div
<section class="one">
<div class="container">
<h1 class="title4 part1">WELCOME TO MY</h1>
<h1 class="title4 part2">PORTFOLIO</h1>
</div>
</section>
.one {position:relative;}
.container {
position:absolute;
/*control the postition of the container div by left=,bottom=,top=,right=*/
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句