CSS背景:background-attachment

荼蘼花开234

荼蘼花开234

2016-02-19 16:38

给自己一点时间接受自己,爱自己,趁着下午茶的时间来学习图老师推荐的CSS背景:background-attachment,过去的都会过去,迎接崭新的开始,释放更美好的自己。

语法:

background-attachment : scroll | fixed

取值:

scroll : 默认值。背景图像是随对象内容滚动

fixed : 背景图像固定

说明:

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/webkaifa/)

设置或检索背景图像是随对象内容滚动还是固定的。

此属性对于 currentStyle 对象而言是只读的。对于其他对象而言是可读写的。

请参阅 bgProperties 属性(特性)。对应的脚本特性为 backgroundAttachment 。

示例:

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/webkaifa/)

html { background-image: url("anasazi.tif"); background-attachment: fixed; }
body { background-attachment: scroll; }

展开更多 50%)
分享

猜你喜欢

CSS背景:background-attachment

Web开发
CSS背景:background-attachment

CSS背景:background

Web开发
CSS背景:background

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

CSS背景:background-color

Web开发
CSS背景:background-color

CSS背景:background-position-y

Web开发
CSS背景:background-position-y

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

CSS背景:background-position

Web开发
CSS背景:background-position

CSS背景:background-repeat

Web开发
CSS背景:background-repeat

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

CSS:font-Faimly

CSS:font-Faimly

CSS文本:unicode-bidi

CSS文本:unicode-bidi
下拉加载更多内容 ↓