Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

分界变色效果 #6

Open
gaoryrt opened this issue Oct 30, 2018 · 2 comments
Open

分界变色效果 #6

gaoryrt opened this issue Oct 30, 2018 · 2 comments
Labels
effect construct of some effect

Comments

@gaoryrt
Copy link
Member

gaoryrt commented Oct 30, 2018

这个不好描述,看图:

oct-30-2018 10-33-19

或者是到原网站看右上方

首先想到的还是不同的 filter 来对 nav 进行颜色 filter
右键看了下,原来是每个 section 都有对应颜色的 nav,用 clip 进行蒙版的操作

@gaoryrt gaoryrt added the effect construct of some effect label Oct 30, 2018
@gaoryrt
Copy link
Member Author

gaoryrt commented Oct 30, 2018

大概是这样:

<section>
	<i class="_red"></i>
</section>
<section>
	<i class="_blue"></i>
</section>
<section>
	<i class="_green"></i>
</section>
section {
	clip: rect(auto, auto, auto, auto);
	-webkit-clip-path: inset(0 0 0 0);
	clip-path: inset(0 0 0 0);
}

@gaoryrt
Copy link
Member Author

gaoryrt commented Oct 30, 2018

codepen 的 demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effect construct of some effect
Projects
None yet
Development

No branches or pull requests

1 participant