本文所分享的知识点是【在div底部显示背景图片实现代码】,欢迎您喜欢我爱IT技术网所分享的教程、知识、经验或攻略,下面是详细的讲解。
在div底部显示背景图片实现代码
div {
background-image:url(/images/bg.jpg);
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样式控制背景图片,让从图片的底部开始...
答:background:url(图片地址) repeat-x或no-repeat bottom; 这样就是背景图片从底部开始显示,设置repeat-x是让在横向循环,不要设置repeat-y,这个是纵向循环,上边的部分,超出图片高度就不会显示了。不够图片的高度就会把图片的上部分隐藏 >>详细
相关问题:如何让div在图像上居底部显示
答:外层div用 position:relative; 里面的div用 position:absolute; 定位 文字 .a1{position:relative; width:200px; height:200px;} .a1 img{width:200px; height:200px;} .a2{position:absolute; left:0px; bottom:0px; width:200px; height:50px;} >>详细
相关问题:CSS 让图片显示在div底部。有一个div 高度没有设定...
答:一张让它显示在底部,已做出,用background-image 让其显示,并设置no-repeat 实现了。 如何在顶部再加一个顶部的图片。 >>详细
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
