好的,所以我對網站開發很陌生,正在和一位朋友一起在一個新的網站上工作。到目前爲止,我已經提出了這個代碼,但由於某種原因,文本是在一個不同的線上。我如何讓這段文字沿着頁面上的一行展開?謝謝!HTML - 網頁中心的文字
代碼(HTML)
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="csgositecss.css">
<title>CSGOCarry.com | Win Big!</title>
<div class="center">
<h1>Welcome to CSGOCarry</h1>
</div>
.center{
position:absolute;
height: 50px;
width: 50px;
left:50%
top:50%
}
</head>
代碼(CSS)
body {background-image: url("csgocarryback.jpg"); background-size: 100%;}
h1 {color:white; text-align:center; font-size:50px}
div {
height: 200px;
width: 400px;
background: none;
position: fixed;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -200px;
}
你裏面,也都提供同樣使用過時的元素無效HTML(''
「It works」永遠不會使用過時元素的原因,這些元素可能會從瀏覽器使用中移除,恕不另行通知: https://www.w3.org/TR/html5/obsolete.html#non-conforming-features – Rob