我正在跟隨一個在線教程,感覺我做了和那個教書的人一樣的事情,但是看起來不是這樣。如果不明顯,我用的是Bootstrap(按鈕類- btn-light)。
body,
html {
width: 100%;
height: 100%;
font-family: 'Montserrat', sans-serif;
background: url(header.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
h1 {
color: white;
font-size: 2.5rem;
text-align: center;
padding-top: 170px;
}
.btn {
margin-top: -60px;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-weight: 1000;
border-radius: 50px;
}
.btn-light {
background-color: aqua;
border-color: white;
}
.btn-light:hover {
background-color: red;
border-color: white;
}
.btn-xl {
padding: 1rem 1.2rem;
}
<link rel="stylesheet">
<link rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<h1 class="text-uppercase"><strong>The Biggest International Startup Of The Year</strong></h1>
<button class="btn btn-light btn-xl">More details</button>