html, body {
margin:10px;
margin-top: 0;
height: 100%;
overflow: hidden;
}
.displayNone{
display:none;
}
pre {
overflow: auto;
max-height: 90%;
width: 100%;
border-radius: 1px; /* Prevents bad clipping in Chrome */
}
.pre {
overflow: auto;
max-height: 100%;
border-radius: 1px; /* Prevents bad clipping in Chrome */
}
#content1 {
position: absolute;
top: 0; right: 20px; left: 0; bottom: 30px;
}
.content {
position: absolute;
top: 0; right: 20px; left: 0; bottom: 30px;
}
#header {
position: absolute;
bottom: 0;
height: 20px;
left: 0;
right: 0;
padding: 0 10px;
}
a:after {
content: '';
padding-right: 5px;
border-right-width: 1px;
border-right-style: solid;
border-color: inherit;
}
a:last-of-type:after {
border: none;
}
.translateX1095 {
transform: translateX(-100%)!important;
-webkit-transform: translateX(-100%)!important;
position: absolute;
}
.translateX1105 {
transform: translateX(-105%)!important;
-webkit-transform: translateX(-105%)!important;
position: absolute;
}
.translateY1105rotateY0010 {
transform: translateY(-105%) rotateY(10deg)!important;
-webkit-transform: translateY(-105%) rotateY(10deg)!important;
position: absolute;
}
.translateY0105rotateY0010 {
transform: translateY(105%) rotateY(10deg)!important;
-webkit-transform: translateY(105%) rotateY(10deg)!important;
position: absolute;
}
.translateY0155rotateY0010 {
transform: translateY(155%) rotateY(10deg)!important;
-webkit-transform: translateY(155%) rotateY(10deg)!important;
position: absolute;
}
.translateY0205rotateY0010 {
transform: translateY(205%) rotateY(10deg)!important;
-webkit-transform: translateY(205%) rotateY(10deg)!important;
position: absolute;
}
.translateY0105rotateY0010R {
transform: translateY(105%) rotateY(10deg)!important;
-webkit-transform: translateY(105%) rotateY(10deg)!important;
position: relative!important;
}
.poR{
position: relative;
}
.rotateY0010 {
transform: rotateY(10deg)!important;
-webkit-transform: rotateY(10deg)!important;
position: absolute;
}
.test-text{
transform: translateY(105%) rotateY(10deg)!important;
-webkit-transform: translateY(105%) rotateY(10deg)!important;
-webkit-transform-origin: left;
position: absolute;
}
#input-text{
/*margin-top: 40%;*/
/*transform: translateY(105%) rotateY(10deg)!important;
-webkit-transform: translateY(105%) rotateY(10deg)!important;*/
height:44%;
text-align:left;
position: relative;
}
.marginTop0100{
margin-top: 100%!important;
}
input{
outline-style: none ;
border: 1px solid #ccc;
border-radius: 10px;
padding: 13px 14px;
width: 80%;
font-size: 14px;
font-weight: 700;
font-family: "Microsoft soft";
background:cornsilk;
}
/*多行文本框*/
.multieditbox{
background: #f8f8f8;
border-bottom: #b7b7b7 1px solid;
border-left: #b7b7b7 1px solid;
border-right: #b7b7b7 1px solid;
border-top: #b7b7b7 1px solid;
color: #000000;
cursor: text;
font-family: "arial";
font-size: 9pt;
padding: 1px; /*www.52css.com*/
}
/*按钮样式*/
.buttonFlow {
position: relative;
background-color: #4CAF50;
border: none;
font-size: 30px;
color: #FFFFFF;
margin: 0;
width: 200px;
height: 75px;
text-align: center;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.buttonFlow:after {
content: "";
background: #90EE90;
display: block;
position: absolute;
padding-top: 300px;
padding-left: 300px;
margin-left: -25%;
margin-top: -75%;
opacity: 0;
border-radius: 10000px;
transition: all 1s;
}
.buttonFlow:active:after {
padding: 0;
margin-left: 50%;
margin-top: -10%;
opacity: 1;
transition: 0s
}
.scrollbarTest{
scrollbar-3d-light-color:red;
scrollbar-arrow-color:red;
scrollbar-base-color:red;
}
#navigationLeft{
opacity: 0;
}
#navigationRight{
opacity: 0;
}
.title{
position:fixed;
top:10px;
left:10px;
font-size: 18px;
height:10px;
width:95%;
}
/**
*
* Hey. My name's CDK.
*
* 我打算建立一个动态网站。
*
* 实况直播编码怎么样?
*/
/**
* 让我马上开始吧。我们先从动画开始,设置动画过渡时间
*/
* {
transition: all 1s;
-webkit-transition: all 1s;
}
/**
*白底黑字很无聊,
*所以让我们做点什么。
*/
html {
background: rgb(63, 82, 99);
}
/**
* 还有字体颜色
*/
pre, a {
color: white;
}
/**
* 这样就好多了。
*
* 在这片空旷的地方工作是很困难的。
*
* 我要为我们的工作创造一个好地方。
*
* 指定不是空的pre元素样式
*/
pre:not(:empty) {
position: absolute;
overflow: auto;
background: rgb(48, 48, 48);
border: 1px solid #ccc;
max-height: 44.5%;
width: 49%;
font-size: 14px;
font-family: monospace;
padding: 10px 10px 20px;
box-shadow: -4px 4px 2px 0 rgba(0,0,0,0.3);
white-space: pre-wrap;/*保留空白符序列,但能正常地进行换行*/
outline: 0;
border-radius: 20px;
}
pre:before{
}
/**
* 可以。我们要开始填充屏幕。
* 我们准备做些工作吧。
*/
#style-text {
-webkit-transform: translateX(96%);
position: absolute;
}
/**
* 这很好,但是所有的文字都是白色的!
* 让我们让它更具可读性。
*/
.comment { color: #857F6B; font-style: italic; }
.selector { color: #E69F0F; }
.selector .key { color: #64D5EA; }
.key { color: #64D5EA; }
.value { color: #BE84F2; }
.value.px { color: #F92772; }
/**
* 现在我们到了某个地方。
* 是时候了解一下情况了。
* 设置元素被查看位置的视图
*/
body {
-webkit-perspective: 1000px;
}
#style-text {
-webkit-transform: translateX(99%) rotateY(-10deg);
-webkit-transform-origin: right;
max-height: 94.5%;
}
/**
* 那么,让我们谈谈项目。这就是你来这里的原因,对吧?
* 我无法想象你只是来看漂亮的颜色。
*/
pre:not(#style-text) {
-webkit-transform: rotateY(10deg);
-webkit-transform-origin: left;
}
/**
* 左边的markdown看起来不太好。我们来渲染一下。
*/
#work-text.flipped {
-webkit-transform: rotateX(0deg) rotateY(190deg) rotateZ(180deg);
}
#work-text{
position: absolute;
}
/**
* #work-text .md {
* -webkit-transform: rotateY(190deg) rotateZ(180deg);
* margin-top: 800px;
* }
*/
/**
* 就快做好了
*/
pre:hover{
box-shadow: 0px 0px 40px 5px rgba(255,255,255,0.4);
}
#test-text .text{
color: #E69F0F;
}
/**
* 开始打印我的简历吧
*/
/**
* 文本可能需要一些调整。
*/
.md {
font-family: "Helvetica Neue", Helvetica, sans-serif;
}
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 {
display: inline-block;
color: #ddd;
border-bottom: 1px solid #ccc;
padding-bottom: 5px;
}
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6, .md ul, .md p {
margin: 0px;
}
/**
* 接下来就是css样式代码添加栏了
*/
/**
* 先给textarea标签添加简单的美化
*/
textarea{
width: 90%;
outline-style: none ;
background:cornsilk;
font-family: "Microsoft soft";
font-size: 14px;
line-height:22px;
font-weight: 700;
border: 1px solid #ccc;
border-radius: 10px;
color:black;
/*resize:none;去除谷歌textarea右下角的小三角*/
/*overflow-y:hidden;没有垂直滚动条*/
}
/**
* 然后是提交按钮的样式
*/
.buttonLine {
float:left;
font-size: 18px;
color: #000;
background: cornsilk;
display: inline-block;
vertical-align: middle;
border: none;
border-radius: 10px;
overflow:hidden;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px transparent;
position: relative;
margin-top: 10px;
padding: 5px;
padding-left: 10px;
padding-right: 10px;
}
/**
* 加点小特效,例如点击之后的波纹效果
*/
.buttonLine:before {
content: "";
position: absolute;
z-index: -1;
left: 50%;
right: 50%;
bottom: 0;
background: yellow;
height: 8px;
-webkit-transition-property: left, right;
transition-property: left, right;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.buttonLine:hover:before {
left: 0;
right: 0;
background: yellow;
}
.buttonLine:after {
content: "";
background: #90EE90;
display: block;
position: absolute;
padding-top: 120px;
padding-left: 120px;
margin-left: -50%;
margin-top: -90%;
opacity: 0;
border-radius: 10000px;
transition: all 1s;
}
.buttonLine:active:after {
padding: 0;
margin-left: 25%;
margin-top: -15%;
opacity: 1;
transition: 0s;
}
/**
* 差点忘了加个小手了
*/
.buttonLine:hover {
cursor:pointer;
background: #fff;
}
/**
* css样式代码添加栏就做好啦
* 顺便再加个导航功能吧,以便日后添加新的展示
*/
#navigation{
position: relative;
height:50%;
left:0;
top:49%;
color:#fff;
user-select:none;
}
/**
* 先是左边的导航按钮
*/
#navigationLeft{
z-index:5;
position: absolute;
opacity: 0.5;
left:0;
height:30px;
width:30px;
background:red;
text-align:center;
line-height:30px;
box-shadow: 0px 0px 40px 5px rgba(255,255,255,0.4);
border-radius: 10000px;
}
#navigationLeft:hover{
cursor:pointer;
}
#navigationLeft:active{
box-shadow: 0px 0px 40px 5px red;
}
/**
* 然后是右边的导航按钮
*/
#navigationRight{
z-index:5;
position: absolute;
opacity: 0.5;
right:0;
height:30px;
width:30px;
background:red;
text-align:center;
line-height:30px;
box-shadow: 0px 0px 40px 5px rgba(255,255,255,0.4);
border-radius: 10000px;
}
#navigationRight:hover{
cursor:pointer;
}
#navigationRight:active{
box-shadow: 0px 0px 40px 5px red;
}
/**
* 接下来是页码的显示
*/
#page{
position: relative;
text-align:center;
height:100%;
width:200px;
left:50%;
margin-left:-100px;
}
.pageContaint{
position: absolute;
width:200px;
text-align:center;
left:50%;
top:92%;
margin-left:-100px;
}
.pageNum{
display:inline-block;
text-align:center;
width:10px;
height:10px;
background:white;
border-radius: 100px;
z-index: 50;
margin:0 auto;
margin:10px;
opacity: 0.3;
}
.pageSelect{
opacity: 1!important;
}
/**
* 这样导航和页码就大功告成啦
* 可以试着点击一下提交按钮来改变文本的颜色吧
*/
cdkking.top
===========
基本信息
-------
姓名: CDK
出生: 1995-05-30
院校: 深圳大学
现居: 深圳
联系方式
-------
手机: 13670183236
邮箱: 1360531956@qq.com
个人技能
-------
语言:JavaScript / Html5 / Css3 / Java / C# / C++
数据库:MySQL / SQL Server
前端框架:Vue / Element UI / Amazing UI / Bootstrap / MUI / Echarts
工具:SVN / Git / Visual Studio Code / IntelliJ IDEA
熟练掌握单例、工厂、构造、原型等多种Javascript设计模式
精通原生JavaScript,canvas绘图,能够独立编写web游戏
熟悉Web性能优化,有移动Web和混合式app开发经验
个人Git地址:https://github.com/cdk-king
个人作品:http://www.cdkking.top/
工作经历
-------
深圳市中交阳光科技有限公司 | 全栈开发工程师 2017-2018
技术栈:ASP.NET (Web Forms 、MVC)/ Vue
参与铁路道路门户管理系统的开发
负责恒泰实业动态管理系统平台、深圳地铁管理系统平台、佛山地铁OA系统平台
的管理开发,主要负责公文系统,合同管理、用户管理系统开发
参与工汇通农民工工资管理系统开发
主要负责工资查询系统、个人工资管理系统、社区管理系统开发
参与工汇通钉钉端和微信公众号平台端开发
深圳市九五互娱科技有限公司 | 前端开发工程师 2018-2019
技术栈:Vue + Java SpringBoot
主导游戏后台管理系统前端的设计和开发
实现用户角色权限管理、多平台渠道区服管理、游戏后台运营管理
主导后台管理系统后台接口和数据库的设计开发
实现复杂关系数据表间映射、线程池缓存数据接口、激活码生成和验证算法
参与游戏服务器功能开发
游戏任务功能的开发、游戏消息系统功能开发
项目
-------
* 游戏后台管理系统
* cdk.js
* web游戏
* 个人博客
* www.cdkking.top
开源
-------
* CerradK
* T2D
* lastColony
* frootWars
* Snail-Bait
* Imitation
* live_game
* cdkBlog
* CDK-Project
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,
initial-scale=1">
<title></title>
</head>
<body>
</body>
<script>
</script>
</html>
<style>
html,body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: #fff;
}
</style>
<canvas id="myCanvas">此浏览器不支持canvas</canvas>
//这里我打算展示一下用canvas来绘制一颗树木
//设置基本参数,获取标签对象元素
var w = window.innerWidth;
var h = window.innerHeight;
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var treeNum = 3;
var initRadius = 18; //树干的初始宽度
var maxGeneration = 5; //最多分支的次数
var branchArray = new BranchArray();//树干的集合
var isLoop = false; //防止多次提交,保护性能
var stop=null;
//设置兼容动画定时器
window.MyRequestAnimationFrame = window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ;
window.MyCancelRequestAnimationFrame = window.cancelRequestAnimationFrame ||
window.mozCancelRequestAnimationFrame ||
window.webkitCancelRequestAnimationFrame ||
window.msCancelRequestAnimationFrame ;
/**
* 初始化canvas
*/
function initCanvas(){
canvas.setAttribute("width",w);
canvas.setAttribute("height",h);
isLoop = false;
if(canvas.getContext){
ctx = canvas.getContext("2d");
initTree();
isLoop = true;
loop();
}
}
/**
* 初始化树的数量
*/
function initTree(){
branchArray = new BranchArray();
for(var i = 0;i<treeNum;i++){
branchArray.add(new Branch(w/2,h));
}
}
/**
* 树干
*/
function Branch(x,y){
this.x = x;
this.y = y;
this.radius = initRadius;
this.angle = Math.PI/2;
this.speed = 2.35;
this.generation = 1;
}
Branch.prototype.grow = function(){
this.draw();
this.update();
}
Branch.prototype.draw = function(){
ctx.fillStyle = "#55220F";
ctx.beginPath();
//创建一个圆形
ctx.arc(this.x,this.y,this.radius,0,2*Math.PI);
//填充
ctx.fill();
}
Branch.prototype.update = function(){
this.angle += random(-0.2 * this.generation/2,0.2*this.generation/2);
var vx = this.speed * Math.cos(this.angle);
var vy = -this.speed * Math.sin(this.angle)-0.1;
if(this.radius<0.9 || this.generation >= maxGeneration){
branchArray.remove(this);
}
this.x += vx;
this.y += vy;
this.radius = this.radius*0.985;
if(this.radius>=0.9){
//计算当前是第几代分支
// y=-1/x
var g = 5/this.radius +(initRadius-maxGeneration)/(initRadius-1);
//得到分支次数,比较是否大于当前分支
if(g>this.generation + 1){
this.generation = Math.floor(g);
for(var i = 0;i<random(1,3);i++){
//创建分支
this.clone(this);
}
}
}
}
Branch.prototype.clone = function(b){
var obj = new Branch(b.x,b.y);
obj.angle = b.angle;
obj.radius = b.radius;
obj.speed = b.speed;
obj.generation = b.generation;
branchArray.add(obj);
//如果当前分支次数等于2,开叶
if(b.generation >= maxGeneration-2){
if(typeof(leafs)!='undefined'){
leafs.push(new Leaf(b.x,b.y));
}
}
//如果当前分支次数大于3,开花
if(b.generation >= maxGeneration-1){
if(typeof(flowers)!='undefined'){
flowers.push(new Flower(b.x,b.y));
}
}
}
/*
树干集合
*/
function BranchArray () {
this.branchs = [];
}
BranchArray.prototype.add = function(b){
this.branchs.push(b);
}
BranchArray.prototype.remove = function (b) {
var index = this.branchs.findIndex(
function(item){
return b===item;
})
if(index!=-1){
this.branchs.splice(index,1);
}
}
function random (min , max) {
return Math.random() * (max - min) + min ;
}
//树叶f
//花f
//太阳f
/**
* 循环遍历所有对象,并调用更新和draw方法,实现动画效果
*/
function loop () {
var len = branchArray.branchs.length;
for(var i = 0 ; i < len ; i ++) {
var b = branchArray.branchs[i];
if(b){
b.grow();
}
}
if(typeof(sun)!='undefined'){
sun.draw();
sun.update();
}
if(typeof(leafs)!='undefined'){
var len = leafs.length;
while (len --) {
leafs[len].draw();
leafs[len].update(len);
}
}
if(typeof(flowers)!='undefined'){
var len = flowers.length;
while (len --) {
flowers[len].draw();
flowers[len].update(len);
}
}
len = branchArray.branchs.length;
if(isLoop){
stop = MyRequestAnimationFrame(loop);
}else{
//可以取消该次动画。
//window.cancelRequestAnimationFrame(stop);
}
}
window.onload = initCanvas;
//接着我们为树木添加叶子,新建树叶对象,
//添加树叶对象的更新方法和绘制方法
var leafs = [];//叶的集合;
var spritesheet = new Image();
spritesheet.src = 'img/sy.png';
/**
* 树叶
*/
function Leaf(x,y){
this.x = x;
this.y = y;
this.r = 15;
this.w = 10;
this.h = this.w/2;
this.speed = 1.0235;
this.angle = Math.random()*2*Math.PI;
}
Leaf.prototype = {
update:function(index){
if(this.w==20){
leafs.splice(index,1);
return;
}
this.w = this.w * this.speed;
this.h = this.w/2;
if(this.w > 20){
this.w = 20;
this.h = this.w/2;
}
},
draw:function(){
ctx.save();
ctx.fillStyle = "#00FF00";
ctx.beginPath();
ctx.translate(this.x, this.y);
ctx.rotate(this.angle);
ctx.drawImage(spritesheet, 0, 0,this.w,this.h);
ctx.rotate(this.angle*-1);
ctx.translate(this.x*-1, this.y*-1);
//ctx.stroke();
ctx.fill();
ctx.restore();
}
}
//然后添加树木的花朵,新建花朵对象,
//添加花朵对象的更新方法和绘制方法
var flowers = [];//花的集合
function Flower(x,y){
this.x = x;
this.y = y;
//初始半径
this.r = 0.5;
this.petals = 5;
this.speed = 1.0235;
//最大半径
this.maxR = random(2,3);
}
Flower.prototype.update = function(index){
//console.log(flowers.length);
if(this.r == this.maxR){
flowers.splice(index,1);
return;
}
this.r = this.r * this.speed;
if(this.r > this.maxR){
this.r = this.maxR;
}
}
Flower.prototype.draw = function () {
ctx.save();
ctx.fillStyle = "#F3097B";
for(var i = 1;i<=this.petals;i++){
var x0 = this.x + this.r *
Math.cos(Math.PI / 180 * (360 / this.petals) * i);
var y0 = this.y + this.r *
Math.sin( Math.PI / 180 * (360 / this.petals) * i);
ctx.beginPath();
ctx.arc(x0 , y0 , this.r , 0 , 2 * Math.PI) ;
ctx.fill();
}
ctx.fillStyle = "#F56BC1";
ctx.beginPath();
ctx.arc(this.x , this.y , this.r / 2 , 0 , 2 * Math.PI) ;
ctx.fill();
ctx.restore();
}
//接着我们在背景添加一个太阳
//这里新建一个恒星对象,再用恒星对象创建一个太阳
function Star(x,y,r,cycle,bColor,eColor){
this.x=x;
this.y=y;
this.r=r;
this.cycle=cycle;
this.time=0;
this.bColor=bColor;
this.eColor=eColor;
}
Star.prototype = {
draw:function(){
ctx.save();
//ctx.translate(500,500);
ctx.rotate(this.time*(360/this.cycle)*Math.PI/180);
ctx.beginPath();
ctx.arc(this.x,this.y,this.r,0,360,false);
ctx.closePath();
var color=ctx.createRadialGradient
(this.x,this.y,0,this.x,this.y,this.r);
color.addColorStop(0,this.bColor);
color.addColorStop(1,this.eColor);
ctx.fillStyle=color;
ctx.fill();
ctx.restore();
this.time+=1;
},
update:function(){
}
}
var sun = new Star(w/2+200,h-500,30,0,
"#FFFF00","#FF9900");
sun.update = function(){
if(this.y <= h-500){
this.y = h-500;
return;
}
this.y = this.y-1;
}