已关闭。此问题需要details or clarity。当前不接受答案。
**想要改进此问题吗?**通过editing this post添加详细信息并阐明问题。
3小时前关门。
Improve this question
我一直在尝试添加背景图片,虽然我写了正确的图片URL,但我仍然无法将图片添加到背景中。这里我使用了内部CSS中的URL,如下面的代码所示。
我甚至尝试直接使用图像标记和源属性,但没有任何效果
<!DOCTYPE html>
<html lang="en">
<head>
<title>Sports Club</title>
<style>
body{
background-image:url(ground.jpeg);
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
background-size: 100% 100%;
}
</style>
<link rel="stylesheet" href="Sports Club.css">
</head>
<body>
<div class="main">
<div class="navbar">
<div class="icon">
<h2 class="logo">RYUK</h2>
</div>
<div class="menu">
<ul>
<li><a href="#">HOME</a></li>
<li><a href="About Us.html">ABOUT</a></li>
<li><a href="Service.html">SERVICE</a></li>
<li><a href="pricing.html">PRICING</a></li>
<li><a href="contact.html">CONTACT</a></li>
</ul>
</div>
<div class="search">
<input class="srch" type="search" name="" placeholder="Search">
<a href="#"> <button class="btn">Search</button></a>
</div>
</div>
<div class="content">
<h1>RYUK Sports Club <br><span>your</span> <br>Perfect Fitness Solution</h1><br />
<button class="cn"><a href="pricing.html">JOIN US</a></button>
<div class="form">
<h2>Login Here</h2>
<input type="email" name="email" placeholder="Enter Email Here">
<input type="password" name="" placeholder="Enter Password Here">
<button class="btnn"><a href="#">Login</a></button>
<p class="link">Don't have an account<br>
<a href="#">Sign up</a> here</p>
<p class="lol">Follow Us!</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
1条答案
按热度按时间sdnqo3pr1#
主体{背景图像:网址(“abc.jpg”);}