Bar*_*más 2 css image background-image
我使用完全相同的代码:
body
{
background-image:url('gradient2.png');
}
Run Code Online (Sandbox Code Playgroud)
发现在W3学校它的简单我得到了相同的文件夹中的图片,我做了一切,我不知道为什么我不能插入图像在CSS.html标签正在运行.我在3-4个月前遇到了同样的问题,现在又用html工作了,但仍然没有工作.这张照片不会显示出来.
这是我的完整css:
*
{
margin: 0;
padding: 0;
}
body
{
background: url("pagebg2.jpg") repeat left top;
font: normal 10pt Arial,Helvetica,sans-serif;
}
#center{
box-shadow: 1px 1px 11px 1px rgba(0, 0, 0, 1);
border: 3px solid rgba(0, 0, 0,0.8);
background-color:#50649d;
border-radius: 20px 20px;
width: 650px;
height:900px;
margin: 0 auto;
}
#pic {
text-align:center;
}
img {
box-shadow: 1px 1px 11px 1px rgba(0, 0, 0, 1);
border: 3px solid rgba(0, 0, 0,0.8);
border-radius: 20px 20px;
}
Run Code Online (Sandbox Code Playgroud)
这是html:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="CSS/btstyle.css">
<title></title>
</head>
<body>
<header>this is the title</header>
<div id="container">
<div id="pic" class="column">
<img src="opel.png" />
</div>
<div id="center" class="column">
center
</div>
</div>
<footer class="foot"><p>©WebMaster pr.toma@gmail.com</p></footer>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
你的代码很完美.我在jsFiddle上测试过它.问题出在您的图片网址上
看看这个: jsFiddle链接
body
{
background: url("http://jsfiddle.net/img/logo.png") repeat left top;
font: normal 10pt Arial,Helvetica,sans-serif;
}
Run Code Online (Sandbox Code Playgroud)
在这里,我只更改图像网址.
| 归档时间: |
|
| 查看次数: |
14723 次 |
| 最近记录: |