【发布时间】:2020-12-29 17:29:18
【问题描述】:
我声明我是 HTML 和 CSS 世界的新手。我正在创建此页面以自定义 Altervista 上称为 not_found.html 的 404 错误,它导入样式以从名为 Style.css 的外部文件对其进行自定义。有问题的 CSS 文件位于名为 Sheets-Style 的文件夹中,而页面直接位于 Altervista 提供的空间的根目录中。
我写的代码如下:
<!DOCTYPE HTML>
<html>
<head>
<title>Errore - 404</title>
<link rel="icon" href="Media/Icona.png" type="image/png"/>
<link rel="stylesheet" type="text/css" href="Fogli-Stile/Style.css"/>
<style type="text/css">
.container {
text-align: center;
border: none;
margin-top: 10%;
}
</style>
</head>
<body>
<div class="container">
<h1>OOPS... Qualcosa è andato storto.</h1>
<p>
Purtroppo non siamo riusciti a trovare quello che stavi cercando.
<br/>
Prova a tornare alla Home e a vedere se trovi qualcosa che ti interessa.
<br/>
Oppure facci sapere come possiamo migliorarci.
<br/>
</p>
<button class="BTN_action" onclick="location.href='index.php'">
Torna alla Home
</button>
<button class="BTN_action">
Inviami un suggerimento
</button>
</div>
</body>
</html>
问题是,当我从 Chrome 打开页面时,我没有导入 css 文件,因此我选择的样式不会出现。
有没有人知道我哪里出错了?
【问题讨论】:
-
我投票结束这个问题,因为它不是英文的。
标签: html css css-selectors