
:IF:
:tt:
Bước 1: Chúng ta xây dựng cấu trúc "HTML" cơ bản, sau đó chúng ta sẽ thêm phần text ở trong "body", ở đây tôi đặt phần text đó trong thẻ "h1" bên trong "body". Mã:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Itrum</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Itrum<br>Forum</h1>
</body>
</html>
Mã:
body {
padding: 0;
margin: 0;
background: #fff;
}
h1 {
font-family: sans-serif;
font-size: 10em;
font-weight: 700;
text-transform: uppercase;
text-align: center;
margin: 200px auto;
}
Mã:
h1 {
font-family: sans-serif;
font-size: 10em;
font-weight: 700;
text-transform: uppercase;
text-align: center;
margin: 200px auto;
color: transparent;
background: url('background.jpg');
background-attachment: fixed;
background-size: cover;
-webkit-background-clip: text;
}