落伍者站长论坛's Archiver

zxd03050402 发表于 2008-7-23 17:53

请问骆驼在线下面的那个背景是怎么搞的啊

请问骆驼在线下面的那个背景是怎么搞的啊?

xp1300 发表于 2008-7-23 17:57

楼主说详细一点,你是不是说那个奥运的图吗???
它是上传后,将它设为背景就行了!

freemylove 发表于 2008-7-23 18:22

通过Css实现,BACKGROUND-POSITION来调节背景位置。

[code]<style>
BODY {
        BACKGROUND-POSITION: center bottom;
        BACKGROUND-IMAGE: url(http://www.luotoor.com/images/index_2008.jpg);
        MARGIN: 0px;
        BACKGROUND-REPEAT: no-repeat;
        TEXT-ALIGN: center;
}
</style>[/code]

图片地址
http://www.luotoor.com/images/index_2008.jpg




background-position -- 定义背景图片的位置
background-position属性是CSS2.1提出的.IE6,Firefox1.5,Opera9支持此属性


取值: [ [ <percentage> | <length> | left | center | right ] [ <percentage> | <length> | top | center | bottom ]? ] | [ [ left | center | right ] || [ top | center | bottom ] ] | inherit
水平
left: 左
center: 中
right: 右
垂直
top: 上
center: 中
bottom: 下
垂直与水平的组合
x-% y-%
x-pos y-pos
inherit: 继承
初始值: 0% 0%
继承性: 否
适用于: 所有元素
background:背景.position:位置.

属性参考:[url]http://www.dreamdu.com/css/property_background_position/[/url]

[[i] 本帖最后由 freemylove 于 2008-7-23 18:24 编辑 [/i]]

zxd03050402 发表于 2008-7-24 15:59

谢谢大侠们了

大乌龟 发表于 2008-7-25 12:22

学习了

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.