js+css实现冲浪游戏代码
代码语言:html
所属分类:游戏
代码描述:js+css实现冲浪游戏代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
html {
min-height: 100vh;
background: lightblue;
display: grid;
place-items: center;
font-family: system-ui;
}
* {
box-sizing: border-box;
}
#gameBox {
width: 360px;
max-width: 360px;
aspect-ratio: 1/1.5;
background: linear-gradient(to right, Wheat, dodgerblue 15%);
border-radius: 8px;
border: 2px solid navy;
position: relative;
overflow: hidden;
}
#gameBox:before {
content: '';
width: 100%;
height: 100%;
background: url('https://contentservice.mc.reyrey.net/image_v1.0.0/?id=fd26005b-ebab-504a-bb38-a0867a26a07b&638968359788768765');
background-size: 100% 100%;
position: absolute;
mix-blend-mode: overlay;
opacity: .5;
left: 100%;
animation: wave 5s ease-out infinite;
}
@keyframes wave {
100% {
left: -10%;
opacity: 0;
}
}
#gameBox:after {
content: &.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0