The API is down for maintenance. You can continue to browse the MDN Web Docs, but MDN Plus and Search might not be available. Thank you for your patience! References CSS background-attachment English (US) background-attachment Baseline Widely available This feature is well established and works...
background-attachment:fixed,scroll;background-repeat:no-repeat,repeat-y;} Result Specification CSS Backgrounds and Borders Module Level 3 #the-background-attachment See also Using multiple backgrounds
复制 p{-url("https://mdn.mozillademos.org/files/12057/starsolid.gif"),url("https://mdn.mozillademos.org/files/12059/startransparent.gif");background-attachment:fixed,scroll;background-repeat:no-repeat,repeat-y;} 浏览器兼容性
CSS p{background-image:url("https://mdn.mozillademos.org/files/12057/starsolid.gif"),url("https://mdn.mozillademos.org/files/12059/startransparent.gif");background-attachment:fixed,scroll;background-repeat:no-repeat,repeat-y;} 结果 规范 浏览器兼容性...
background-attachment属性 设置背景图像是否固定或者随着页面的其余部分滚动 取值: scroll:背景图片随着页面的滚动而滚动(默认) fixed:背景图片不会随着页面的滚动而滚动。 local:背景图片会随着元素内容的滚动而滚动。 通过background-attachment: fixed能够做出滚动视差的效果...
background-origin background-position background-repeat background-size CSS3 Spec MDN Browser Support Thefixedandscrollvalues are supported everywhere, althoughfixedcanbehave strangely on mobile.localhas this browser support: Desktop Mobile / Tablet...
我是跳跳吧 1.2k61124 发布于 2021-09-10 表示背景圖會填充到邊框的位置。 有用 回复 唯一丶 23.1k103743 发布于 2021-09-10 参考MDN 上的演示例子,以体验不同参数的区别和表现 background-attachment - CSS(层叠样式表) | MDN 有用 回复 撰写...
✅ 132: Supported ✅ 133 - 135: Supported Safari ✅ 3.1 - 13.1: Supported ◐ 14 - 15.3: Partial support ✅ 15.4 - 18.2: Supported ✅ 18.3: Supported ✅ 18.4 - TP: Supported Opera ❌ 10: Not supported ✅ 11.5 - 113: Supported ✅ 114: Supported Safari on iOS ❌ 3.2...
The API is down for maintenance. You can continue to browse the MDN Web Docs, but MDN Plus and Search might not be available. Thank you for your patience! References CSS background-attachment English (US) background-attachment Baseline Widely available This feature is well established and works...
当给页面body设置背景图片,背景图片默认是随着滚动条下拉而滚动的。下面写一个示例看看,如下: 代码语言:javascript 复制 <!DOCTYPEhtml>Documentbody{background-image:url(meinv.jpg);}p{width:100px;height:1000px;margin:50px auto;font-size:18px;color:red;}<!--(p{段落内容$})*7-->段落内容1段落内容...