手机
当前位置:查字典教程网 >网页设计 > Div+Css教程 >在div底部显示背景图片实现代码
在div底部显示背景图片实现代码
摘要:下面代码实现div层背景图片在底部显示:div{background:url(/images/bg.jpg)no-repeatfixed;b...

下面代码实现div层背景图片在底部显示:

div {

background:url(/images/bg.jpg) no-repeat fixed;

background-position-y:bottom;

}

代码详解:

div {

background-image:url(/images/bg.jpg);/*设置div层的背景图片*/

background-repeat:no-repeat;/*背景图片不重复显示*/

background-repeat:repeat;/*背景图片横向及纵向重复*/

background-repeat:repeat-x;/*背景图片横向重复*/

background-repeat:repeat-y;/*背景图片纵向重复*/

background-attachment:fixed;/*固定背景图片*/

background-attachment:scroll;/*滚动背景图片*/

background-position-x:left;/*背景图片在横向的最左方显示*/

background-position-x:right;/*背景图片在横向的最右方显示*/

background-position-y:top;/*背景图片在纵向的最上方显示*/

background-position-y:bottom;/*背景图片在纵向的最下方显示*/

}

【在div底部显示背景图片实现代码】相关文章:

CSS自动控制图片大小的代码

CSS里随滚动条滚动代码

在div底部显示背景图片实现代码

网页中用于构造图表的一些基本CSS代码

让多个div在同一行显示的样式及html代码

左中右3栏最先显示中栏内容的方法

CSS定义Radio单选项和Checkbox复选框样式有效代码

CSS3制作loading加载动画效果代码

div内table居中实现代码

css强制文字不换行实现代码

精品推荐
分类导航