美文网首页
刚发现了background-attachment属性,好用

刚发现了background-attachment属性,好用

作者: 小强不是蟑螂啊 | 来源:发表于2019-04-17 21:05 被阅读0次

取值有四种:

scroll:默认值,背景图相对于元素固定,背景随页面滚动而移动,即背景和内容绑定。

fixed:背景图相对于视口固定,所以随页面滚动背景不动,相当于背景被设置在了body上,可以滚动内容,背景不变。

local:背景图相对于元素内容固定,

inhert:继承

相关文章

  • 刚发现了background-attachment属性,好用

    取值有四种: scroll:默认值,背景图相对于元素固定,背景随页面滚动而移动,即背景和内容绑定。 fixed:背...

  • Tailwind Background

    背景滚动(background attachment) CSS提供的background-attachment属性...

  • background-attachment属性

    做网站时想实现背景图不动,上面的内容动的效果.网上搜一下,找到了一篇不错的文章 以下内容均引入自backgroun...

  • CSS:background-attachment属性

    background-attachment:scroll | fixed | inherit scroll,默认值...

  • CSS background-attachment 属性

    最近看到许多网页运用了一个效果,网页往下翻背景跟着屏幕滚轮的滚动而滚动。这让我很好奇是什么技术做出来的效果,正巧这...

  • 高大上的网站细节

    想到就更新 滚动块但是背景图片不随之滚动background-attachment属性 background-at...

  • CSS背景

    background:简写属性background-attachment:背景图像是固定或是随页面其余部分滚动ba...

  • 编程大白话之-background(贰)

    今天接着上文继续来跟大家说说background的其余的四种属性。 background-attachment ...

  • 什么是background-attachment

    background-attachment的作用是设置背景图片是随滚动轴如何滚动的css属性 background...

  • css背景控制

    属性:background-attachment说明:设置背景图的滚动方式,可以为固定或者随内容滚动可用值:fix...

网友评论

      本文标题:刚发现了background-attachment属性,好用

      本文链接:https://www.haomeiwen.com/subject/mwpowqtx.html