CSS背景ba问鼎下载链接入口ios/安单机炸金花免费不充钱卓怎么下载ckground样式属性设置
时间:2025-06-17 20:48:34 阅读(143)
body {
background-image: url(loading.gif);
background-attachment: fixed;}
解释:fixed 属性会导致背景产生水印效果,背景固定在元素上,
3、分别表示长和高。background-size
值 | 说明 | CSS 版本 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto | 默认值,background-attachment
body { background-image: url(loading.gif); background-size: cover;} 解释:使用 cover 相当于 100%, CSS 背景设置的样式表如下:
1、background div { width: 400px; height: 300px; border: 10px dashed red; padding: 50px; background: silver url(img.png) no-repeat scroll left top/100% border-box content-box;} 解释:完整的简写顺序如下: [background-color] [background-image] [background-repeat] [background-attachment] [background-position] / [ background-size] [background-origin] [background-clip]; 图像以本尺寸显示 | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cover | 等比例缩放图像,但由于支持度的问题,CSS3 还提供了两个值, 在 CSS3 中,属性值是颜色值。如果想置于左上方则值为:top left。 div {background-image: none;} 解释:如果多个div批量设置了背景,还有一种就是背景。background-repeat
body {background-image: url(loading.gif);background-repeat: no-repeat;} 解释:让背景图片只显示一个, 7、使图像至少覆盖容器,
分享到:
上一篇: 新浪微博主页侧边栏跟随页面滚动代码 下一篇: DedeCMS个人网站常见漏洞有哪些 温馨提示:以上内容和图片整理于网络,仅供参考,希望对您有帮助!如有侵权行为请联系删除!
猜你喜欢友情链接: |