js实现canvas文字雨矩阵背景搜索框效果代码
代码语言:html
所属分类:搜索
代码描述:js实现canvas文字雨矩阵背景搜索框效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<style>
* {
margin: 0;
padding: 0;
}
body {
overflow: hidden;
}
</style>
<style>
/* cyrillic */
html, body {
width: 100%;
height: 100%;
overflow: hidden;
font-family: 'Rubik Mono One', sans-serif;
background: #22292C;
}
svg {
width: 100%;
height: 100%;
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
}
#d {
position: absolute;
text-align: center;
top: 20%;
left: 50%;
transform: translateX(-50%);
width: 500px;
}
button {
z-index: 2;
height: 26px;
width: 100px;
box-shadow: 0px 0px 0px 1px #2868c8;
color: #fff;
font-size: 15px;
letter-spacing: 1px;
background: #3385ff;
border-bottom: 1px solid #2d78f4;
outline: medium;
border: 1px solid #2868c8;
}
.input {
z-index: 2;
font-size: 20px;
font-family: helvetica, sans-serif;
background: none;
border: 1px solid #ddd;
color: #eee;
}
.text, .offscreen-text {
width: 100%;
top: 50%;
transform: translateY(-50%);
display: block;
position: absolute;
margin: 0;
}
.offscreen-text {
text-align: center;
top: -9999px;
}
.text span {
position: absolute;
}
.webdesigntuts-workshop {
height: 100%;
width: 100%;
}
.webdesigntuts-workshop:before,
.webdesigntuts-workshop:after {
content: '';
display: block;
height: 0px;
left: 50%;
margin: 0 0 0 -400px;
width: 800px;
}
.webdesigntuts-workshop:before {
background: #444;
background: -webkit-linear-gradient(left, #151515, #444, #151515);
background: -moz-linear-gradient(left, #151515, #444, #151515);
background: -o-linear-gradient(left, #151515, #444, #151515);
background: -ms-linear-gradient(left, #151515, #444, #151515);
background: linear-gradient(left, #151515, #444, #151515);
top: 192px;
}
.webdesigntuts-workshop:after {
background: #000;
background: -webkit-linear-gradient(left, #151515, #000, #151515);
background: -moz-linear-gradient(left, #151515, #000, #151515);
background: -o-linear-gradient(left, #151515, #000, #151515);
background: -ms-linear-gradient(left, #151515, #000, #151515);
background: linear-gradient(left, #151515, #000, #151515);
top: 191px;
}
.webdesigntuts-workshop span {
background: #111;
background: -webkit-linear-gradient(#1b1b1b, #111);
background: -moz-linear-gradient(#1b1b1b, #111);
background: -o-linear-gradient(#1b1b1b, #111);
background: -ms-linear-gradient(#1b1b1b, #111);
background: linear-gradient(#1b1b1b, #111);
border: 1px solid #000;
border-radius: 5px;
box-shadow: inset 0 0 0 1px #272727;
display: inline-block;
font-size: 0px;
margin: 50% auto 0;
padding: 20px;
z-index: 1;
}
.webdesigntuts-workshop input {
background: #222;
background: -webkit-linear-gradient(#333, #222);
background: -moz-linear-gradient(#333, #222);
background: -o-linear-gradient(#333, #222);
background: -ms-linear-gradient(#333, #222);
background: linear-gradient(#333, #222);
border: 1px solid #444;
border-radius: 5px 0 0 5px;
box-shadow: 0 2px 0 #000;
color: #888;.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0