首页 \ 问答 \ Css滚动内容阴影效果(Css scroll content shadow effect)

Css滚动内容阴影效果(Css scroll content shadow effect)

我正在寻找一个插件(类似于我猜的粘性标题),它可以在可滚动内容上创建盒子阴影效果(当你向下滚动时)。

我发现了一种使用纯CSS技巧的现有技术 ,它完全符合我的需求(使用background-color属性)

然而,可滚动的内容会在影子之上 ,我需要它在影子之下。

有什么插件可以创建相同的效果,但是使用带阴影和动态不透明度的内部div或类似的东西?

你可以看到白色div位于shaodow之上


I am looking for a plugin (similar to sticky header i guess) which creates box-shadow effect on scrollable content (while you scroll down).

I found an existing technique which is using pure CSS tricks, which does exactly what i need (uses background-color property)

However, the scrollable content gets above the shadow, and i need it to be below the shadow.

Is there any plugin which creates the same effect but using an inner div with shadow and dynamic opacity or something like this?

You can see the white div gets above the shaodow


原文:https://stackoverflow.com/questions/27481585
更新时间:2024-01-16 13:01

最满意答案

这将完成工作:

convert input_file -background transparent -extent '18x18' output_file

This will do the job:

convert input_file -background transparent -extent '18x18' output_file

相关问答

更多
  • 这是一个棘手的问题,因为直接从Javascript访问文件的唯一方法是使用FileReader,这是一个相对较新的功能,并且在大多数浏览器中尚不支持。 但是,您可以通过使用画布来获得所需的结果。 如果你有一个画布,你可以给它分配一些独特的颜色(比如用于绿色屏幕的霓虹绿)。 然后,您可以将图像插入到画布上,并使用此处提及的方法来获取每个单独的像素。 然后,您可以检查每个像素的颜色,看看该点是否与您的背景颜色相对应(如果是透明的),还是有其他颜色(不透明)。 有点讨厌,但不要以为纯JS可以做什么。 This i ...
  • 也许这样的事情,除了路径;数据需要设置抛出代码完成连接所有点。 M 32.5,0.499977L 192.5,0.499977L 192.5,160.5L 160.5,128.5L 160.5,32.5L 64.5,32.5L 32.5,0.499977 Z M 0.5,64.5001L 128.5,64.5L 128.5,192.5L 96.5,160.5L 96 ...
  • 如果你不熟悉核心基础和低级别的东西,你可以简单地使用[UIBezierPath bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:]来获得带圆角的矩形。 例: UIGraphicsBeginImageContext(originalImage.size); UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, originalIm ...
  • ImageMagick有一个名为composite的命令行工具,可以执行您想要的操作。 适用于Windows,Mac,Linux等的发行版。我刚刚使用两个透明的PNG进行了测试,并按预期工作。 composite foreground.png background.png newimage.png ImageMagick has a command line tool called composite which will do what you want. Distributions available ...
  • 我知道这个问题很老,但现在我偶然发现了,我不妨回答它。 你想要的ImageMagick命令是: convert -alpha extract -threshold 0 -negate -transparent white 我会分解它在做什么。 -alpha extract - 取图像的alpha蒙版 。 完全透明的像素是黑色的,完全不透明的像素是白色的。 -threshold 0 - 如果所有通道大于零,则将所有通道增加到其最大值。 在这种情况下, 除了完全黑色的像素之外 ,它将使 ...
  • 这将完成工作: convert input_file -background transparent -extent '18x18' output_file This will do the job: convert input_file -background transparent -extent '18x18' output_file
  • MiniMagick::Image.trim就是我们所需要的。 如果没有像素迭代器,最简单的方法是在克隆图像上应用trim,并对最小的结果进行操作。 require 'mini_magick' def trimed_image(path) image = MiniMagick::Image.open(path) test_image = image.clone test_image.trim if test_image.width < image.width || test_image.h ...
  • 问题背景 Canvas使用消除锯齿使图形看起来更加平滑,这就是为什么它在这里和那里填充半透明像素(请参阅此解释 ,了解其工作原理)。 可以关闭平滑(也称为插值),但仅适用于图像( ctx.imageSmoothingEnabled = false ,顾名思义)。 解决方案 为此,需要实施“线渲染器”。 然而,典型的线算法仅支持宽度为1像素的线。 这包括Bresenham以及EFLA( Po-Han Lin的极快线算法),后者比Bresenham快。 对于厚度大于1个像素的线条,您需要查找切线角度,然后沿着主 ...
  • 您可以使用shell脚本来构建ppm图像。 echo "P2" echo "# Column (width) Row (height)" echo "$1 $1\n1" t=`expr $1 / 8` for i in `seq 1 4`; do for i in `seq 1 $t`; do for i in `seq 1 4`; do for i in `seq 1 $t`; do echo -n "1 "; done for i ...
  • 而不是尝试编写像Gimp这样的巨大的交互式GUI程序,如何使用像ImageMagick的convert这样的简单命令行图像工具。 以下是从他们的文档中完成此操作的示例: convert moon.png -background HotPink -alpha Background moon_hotpink.png Rather than trying to script a huge, interactive GUI program like the Gimp, how about just using a ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)