2017-02-03 106 views
-2

如何将文本“欢迎使用我的作品集”移动到上面?问题与编码,我该如何解决这个问题?

Example of my coding/site.

这里是我的代码:

.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; 
} 
+1

流行的看法相反,学技术的最好途径是俗称* *研究的过程。为了能够发布这个问题,你实际上必须点击一堆屏幕上的提示和方法的问题,包括建议来研究你的问题的答案。最常见的研究方法是搜索。 –

回答

1

你尝试减少.part1margin-top价值?

你应该把<h1><h1>内格

<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=*/ 
} 
0

设置阴性切缘是单向的:

.one{ 
    margin-top:-50px 
} 
0

你有边距推下来,只是更改页边距-top.part1类从120px降低到80px之类;

.part1 { 
/* margin-top:120px; This line is causing it to lower. */ 
    margin-top:80px; 
}