|
|

楼主 |
发表于 2022-5-13 12:50
|
显示全部楼层
本帖最后由 马黑黑 于 2022-5-13 13:15 编辑
代码分享:
- <style>
- .sea {
- left: -214px;
- width: 1024px;
- height: 560px;
- background: linear-gradient(skyblue,#eee,darkblue);
- filter:url(#wave);
- clip-path: inset(10px);
- overflow: hidden;
- position: relative;
- }
- .cloud {
- background: transparent;
- border-radius: 20% 50%;
- width: 400px;
- height: 120px;
- left: -30px;
- top: -100px;
- box-shadow: 140px 120px 60px 20px rgba(255,255,240,.95);
- filter: url(#wave);
- position: absolute;
- }
- </style>
- <div class="sea">
- <div class="cloud"></div>
- <div class="cloud" style="transform: translate(375px,-20px) rotate(-10deg);"></div>
- </div>
- <svg width="0" height="0" style="position: absolute;">
- <filter id="wave">
- <feTurbulence type="turbulence" baseFrequency="0.01 .1" numOctaves="1" result="turbulence" seed="50" />
- <feDisplacementMap in2="turbulence" in="SourceGraphic" scale="20" xChannelSelector="R" yChannelSelector="B" />
- </filter>
- </svg>
复制代码
|
|