可以在html中添加背景图片吗?
这是我的小提琴,我需要放在"container div“上。
我还需要在画布上延伸的背景,我可以在css中做到这一点吗??
http://jsfiddle.net/7Gacp/3/
<div id="profile-container">
<div id="fixed-header"></div>
<div class="container" style="background: url("../../img/followers/followers-tabs.png") no-repeat 0 0px;"></div>
<div class="sticky-header">This needs to be fixed when hits top of screen</div>
<div class="img">needs to be smooth</div>
<div class="img"></div>
<div class="img"></div>
</div>
干杯
发布于 2013-10-15 05:02:53
去掉双引号,改用单引号,如下所示
"background: url('../../img/followers/followers-tabs.png')
发布于 2013-10-15 04:59:50
background-image:url('image path');
将这段代码放在ur css中并获得背景图像集。
发布于 2013-10-15 05:05:42
.container {
height:300px;
width:100%;
background-image: url("Put your image link here.");
}
将适用于内联样式:
<div class="container" style="background: url('Put your image link here.') no-repeat 0 0px;"></div>
Fiddle
https://stackoverflow.com/questions/19369170
复制相似问题