gpt4 book ai didi

html - 字体、背景和页脚有问题

转载 作者:行者123 更新时间:2023-11-28 06:24:29 26 4
gpt4 key购买 nike

我对 html/css 有点陌生,我正在制作我的第一个网站,但我只是想不通一些东西。

首先,我在 dreaweaver 中工作...在 dreaweaver 中,一切看起来都不错,但是当我预览时,我缺少正确的字体(我的主文件夹中有 otf 字体)、背景,并且不知何故我得到了一个不需要的链接我的页脚。

提前感谢您的所有回答。

HTML

<!doctype html>
<html>
<head>
<link href="css1.css" rel="stylesheet" type="text/css">

<div>
<li>

<a href="projects.html"</a>
<img src="lg.png" width="600" height="593" alt=""/>

</li>
<div>


<meta charset="utf-8">
<title>mtp</title>
</head>

<body>
</body>
</html>


<footer >Coypright 2016 Matic Toni</footer>

CSS

@charset "utf-8";
div {
text-align: center;
padding-bottom: 30px;
}
body {
background-image: url(background.jpg);
background-sizce: cover;
}

footer {
font-family:"Proxima Nova ScOsf ExCn Rg"
text-align: center;
clear: both;
background-color: #000000;
bottom: 100px;
color: #BDBDBD;
font-size: x-small;
margin-top: 5%;
margin-right: 5%;
margin-bottom: 5%;
margin-left: 5%;
padding-top: 3px;
padding-right: 3px;
padding-bottom: 3px;
padding-left: 3px;
}

最佳答案

确保您的开始和结束标签是完整的。这里有一条违规行:

<a href="projects.html"</a>
<img src="lg.png" width="600" height="593" alt=""/>

修复如下:

<a href="projects.html">
<img src="lg.png" width="600" height="593" alt=""/>
</a>

也就是说,您的 html 格式相当错误。确保您匹配所有开始和结束标签。元素应形成树状结构。

Here is a codepen with the html fixed .

<!doctype html>
<html>

<head>
<link href="css1.css" rel="stylesheet" type="text/css">
<meta charset="utf-8">
<title>mtp</title>
</head>

<body>
<div>
<ul>
<li>
<a href="projects.html">
<img src="lg.png" width="600" height="593" alt="" />
</a>
</li>
</ul>
</div>
<footer>Coypright 2016 Matic Toni</footer>
</body>

</html>

关于html - 字体、背景和页脚有问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35367702/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com