2017-02-03 105 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; 
}