0
Q
自定义背景图片
A
回答
4
您将使顶部和底部div
元素,并设置其CSS如下:
#topBGDiv
{
width: 100%;
height: 125px; // Make this the height of the background image in pixels
background-image: url('dark-gray-ribbon.jpg');
background-repeat: repeat-x;
overflow: hidden;
}
#bottomBGDiv
{
width: 100%;
height: 110px; // Make this the height of the background image in pixels
background-image: url('light-gray-ribbon.jpg');
background-repeat: repeat-x;
overflow: hidden;
}
使用图像这样的顶级的背景图像:
和一个这样的底部:
最后,将页面背景颜色的CSS设置为中间颜色。所以,这样的事情:
body
{
background-color: #C0C0C0;
}
0
你可以这样写:
#top,#bottom
{
height: 110px; // Make this the height of the background image in pixels
background: url('BG.jpg') repeat-x left top;
}
#bottom
{
background-position:left bottom;
}
相关问题
- 1. 自定义背景图片
- 2. 自定义字段背景图片
- 3. 自定义背景图片在IOS5 SDK
- 4. 自定义UIView背景图片
- 5. 自定义UINavigationController UIToolbar背景图片
- 6. 自定义背景
- 7. 自定义背景?
- 8. 语义背景图片
- 9. Google地图中自定义拼贴的背景图片
- 10. 谷歌地图 - 自定义背景图片
- 11. 在UIButton的背景图片上自定义绘图
- 12. 谷歌地图与自定义背景图片
- 13. Android自定义相机api以自定义png作为背景拍摄图片
- 14. 在WordPress中设置自定义元背景图片
- 15. 在django中设置自定义背景图片
- 16. 自定义背景图片不起作用
- 17. 根据屏幕分辨率显示自定义背景图片
- 18. 在BlackBerry字段或管理器上自定义背景图片
- 19. 中添加自定义背景图片的WordPress一次
- 20. 在jQuery手机中制作自定义背景图片
- 21. 我如何让用户自定义背景图片?
- 22. 自定义标题中的背景图片
- 23. 自定义标签栏背景图片太大
- 24. 添加自定义背景图片后导航栏太大
- 25. 自定义UINavigationBar的背景图片 - Swift 3.0
- 26. 如何隐藏自定义标题背景图片?
- 27. 如何自定义的复选框,添加背景图片
- 28. UINavigationBar的带有自定义背景图片
- 29. 如何从图片中自定义背景颜色
- 30. 自定义表格单元格背景图片
难道你想在一个图形软件来创建一个背景图像,或者你要使用的图像(S)为背景,在布局中获得这种效果? –