有人能告诉我我编码错了吗?一切正常,唯一的问题是顶部没有边缘.
HTML:
<div id="contact_us"> <!-- BEGIN CONTACT US -->
<span class="first_title">Contact</span>
<span class="second_title">Us</span>
<p class="content">For any questions whatsoever please contact us through the following e-mail address:</p></br></br>
<p class="e-mail">info@e-mail.com</p></br></br></br></br>
<p class="read_more"><a href="underconstruction.html">Read More</a></p>
</div> <!-- END CONTACT US -->
Run Code Online (Sandbox Code Playgroud)
CSS:
span.first_title {
margin-top: 20px;
margin-left: 12px;
font-weight: bold;
font-size: 24px;
color: #221461;
}
span.second_title {
margin-top: 20px;
font-weight: bold;
font-size: 24px;
color: #b8b2d4;
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试添加一个favicon到我的网址栏.但是它没有出现,我确定路径是正确的,因为当我将它用作普通图像时,它确实显示出来.这是html代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> title </title>
<link href = "styles.css" rel="stylesheet" type="text/css" />
<link rel="icon" type="image/png" href="../images/favicon.png">
Run Code Online (Sandbox Code Playgroud) 目前我在css中使用div和'background-image'来放入我的图像.但是,我如何使用这些对SEO有利?我过去常常使用alt-tags作为我的SEO策略的一部分.你如何用div做到这一点.或者你建议在相关部分使用img src吗?
我是CSS的新手,当我尝试插入background-image它时,它不会显示出来.
HTML:
<div id="logo"></div>
Run Code Online (Sandbox Code Playgroud)
CSS:
#logo {
background-image: url(../images/logo.png);
background-repeat: no-repeat;
width: 376px;
height: 81px;
margin-top: 28px;
margin-left: 128px;
}
Run Code Online (Sandbox Code Playgroud)