Giter Club home page Giter Club logo

bilibili--'s Introduction

BiliBili--

模仿2020年哔哩哔哩主站 秋季高斯模糊的header实现 image

#实现思路

  • 首先我们使用6张图堆叠而成的,以图片的左边为起点看做0,图片的右边为终点,看做1的话,当鼠标从0到1时,图片的高斯模糊情况是这样的,作为背景图的1随着鼠标的右移慢慢模糊,其他5分图层也是如此,所以我们需要知道这个图层在0-1之间占哪一个位置,0-1是通过当前的clientX去除以整个图片的宽度获得的,其高斯模糊附和线性函数x^{2}变化规律,但x^{2}变化的幅度与原版还是有差异,经过尝试后发现其变化程序与x^{2}\cdot20 类似,如下图所示 image -所以在这个函数中的x我们需要用index/图层数组的长度-他在整个图层中所占的位置

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.