![](a8.png)
此篇纯属娱乐,还望不要介怀。行外看精彩,行内看笑话。
本篇,献给那些零基础,想学点创意,娱乐,或者来两行代码去表白的人。(程序员,也可以是很浪漫的,直男,也有心中旁人无法读懂的美。希望此篇能对你有所帮助)
该篇目录大致如下:
一 :代码定时关机&取消;
二 :vbs弹窗表白&整人;
三 :html样式表白
四 :小游戏加表白
此处我们用vsb来实现(vsb是一种脚本语言,一般系统都能支持)
CreateObject("Wscript.Shell").run "cmd.exe /c shutdown -s -t 12"
一行代码,给你不一样的关机体验,上诉为定时关机,下面讲解步骤,共三步即可:
① 创建一个记事本文件
②将上诉代码无格式张贴放进去
③保存并修改文件后缀为.vbs
然后双击运行即可。时间可自行修改上诉代码,示例如下:
//该部分末尾12 表示秒。可自行修改
//该代码的意思是表示电脑在12秒后关机
CreateObject("Wscript.Shell").run "cmd.exe /c shutdown -s -t 12"
在上诉12秒时间内,可用。
代码:
CreateObject("Wscript.Shell").run "cmd.exe /c shutdown -a"
步骤如上,双击即可取消
赠送 **手动无鼠操作,一套走:
①Windows键 + R键
②输入cmd
③输入shutdown -s
该部分代码依旧是vbs文件,大致是双击文件后弹窗,你不接受我,我就不让你关闭不了这个弹窗(过程是比较now的,可以改为不接受我就把你电脑轰炸掉或让你关机,乃至植入木马,这种就有点过分了,暂不传授),该部分可在任务管理器中强行结束,代码如下:
①简单无强制弹窗(代码如下)
msgbox("做我女朋友好吗")
msgbox("房产证上写你的名字")
msgbox("保大")
msgbox("我妈会游泳")
过程同上,中文部分可自行修改,每一个msgbox为一次弹窗,上述弹窗四次,双击运行即可
const title = "小明给小花"
const yourname = "我也爱你"
const question = "我对你爱慕已久,希望。。。。。,如果你爱我,请在下面输入“我也爱你” "
const info ="不,这不是你的真实答案,请重新输入"
const scend ="那我们约会把吧,地点学校小公园,明天下午四点,不见不散"
dim youranswer
do
youranswer = inputbox(question, title)
if youranswer <> yourname then msgbox info,vbinformation+vbokonly,title
loop until youranswer = yourname
msgbox scend,vbinformation+vbokonly,title
步骤同一,双击即可,中文部分可自行改动。(有时,放手也是一种选择,给出两种强行关掉的方法,①关机重启,②任务管理器(Ctrl+Shift+~)关掉改进程—推荐该方法,③通过cmd命令杀死)
同上,只是换点文字,换种玩法,代码如下
const title = "谁是猪测试"
const yourname = "小明"
const question = "此乃机密文件,请大声告诉我,谁是pig,请沉默三秒,并将答案填在下面"
const info ="不,这不是你的真实答案,请重新输入"
const scend ="你说的太对了,小明你就是一坨猪,欢迎下次光临"
dim youranswer
do
youranswer = inputbox(question, title)
if youranswer <> yourname then msgbox info,vbinformation+vbokonly,title
loop until youranswer = yourname
msgbox scend,vbinformation+vbokonly,title
该部分如果需要修改代码,需要一点简单代码基础,不过电脑本身不需要安装什么支持,可直接操作和上手,介绍及效果如下
上图为所需文件。以下为部分讲解:
①提问不同意便弹窗部分
不愿意时,会有类似上诉词条弹处,同意便是后面的烟花部分了,而上述弹出词条可改
用记事本打开
tallk.js文件
代码演示:
$(function() {
$('#yes').click(function(event) {
modal('我就知道小姐姐您一定会愿意的。(^_^)', function() {
$('.page_one').addClass('hide');
$('.page_two').removeClass('hide');
// typeWrite();
fireworks();
});
});
$('#no').click(function(event) {
modal('明人不说暗话!', A);
});
});
function A() {
modal('我喜欢你!', B);
}
function B() {
modal('我知道你在等我这一句话', C);
}
function C() {
modal('请您不要拒绝我', D);
}
function D() {
modal('拒绝我,不存在的', E);
}
function E() {
modal('这辈子都不可能让你离开我', F);
}
function F() {
modal('跟我走吧', G);
}
function G() {
modal('房产证上写你名', H);
}
function H() {
modal('我会做饭', I);
}
function I() {
modal('爱你。么么哒!', J)
}
**上诉代码表示如果没有同意的情况下,你点确定,会重复弹处如上,不过当道方法I,及弹处爱你/么么哒时,后面有个j,表示调用了方法j,而j写了结束该部分,就会直接带你去看烟花,文字部分可改**
function J() {
modal('行,我们去民政局登记吧', function() {
fireworks();
});
}
function fireworks() {
$('.page_one').addClass('hide');
initAnimate();
}
function modal(content, callback) {
var tpl = ''+
''+
''+
''+ content +'
'+
''+
''+
'';
$('body').append(tpl);
$(document).on('click', '.confirm', function() {
$('.container').remove();
callback();
});
}
②烟花部分:
效果:
可用记事本打开上诉html文件
放烟花
小姐姐,我好喜欢你,你愿意做我女朋友吗?
愿意
不愿意
上诉为html部分,效果如下:
③另有背景音乐music.mp3文件,可自行修改,但文件及后缀名,目录相同必须
①index.html,小游戏部分,是一个打地鼠的游戏,纯html写的,效果嘛,试试就知道了,不过哄女孩子应该还行。只有当你拿到一百积分通关后才能看到后面的东西,当然,通关积分可控,定个几万分也没问题,只要你不怕。
展示:
爱的游戏
得分:0
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
![地鼠](image/mouse.png)
②lovenote.html,进入正题了,开始你的宣言了
效果如下:
代码如下:
爱的短信
感动中的留情,短信中的深情
- - 请阅读到底部6秒钟后有惊喜奥
亲爱的还记得我们第一年相遇,那些准时的短信吗?还记着那些甜甜蜜蜜的照片吗?
****该部分为煽情码字的地方,有事没事啥的,对话记录啥的,多写点,聊天记录啥的,写上去,对你真心的肯定会看完,不喜欢的就一笑而过,你也就看看好了** **
暖暖,希望在平安夜这个寒冷的夜晚,她能够收到,鸿基送来暖暖祝福! 梦杰
③lovespin.html部分,拼图特效
之前19年抖音挺火的一个东西,今天咱用起来,效果如下:
是一个类三D的一个旋转图形界面,纯css,其实还是比较简单的,大小缩放也很有艺术感
代码如下:
css:
@charset "utf-8";
*{
margin:0;
padding:0;
}
body{
max-width: 100%;
min-width: 100%;
height: 100%;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-size:100% 100%;
position: absolute;
margin-left: auto;
margin-right: auto;
}
li{
list-style: none;
}
.box{
width:200px;
height:200px;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-size:100% 100%;
position: absolute;
margin-left: 42%;
margin-top: 22%;
-webkit-transform-style:preserve-3d;
-webkit-transform:rotateX(13deg);
-webkit-animation:move 5s linear infinite;
}
.minbox{
width:100px;
height:100px;
position: absolute;
left:50px;
top:30px;
-webkit-transform-style:preserve-3d;
}
.minbox li{
width:100px;
height:100px;
position: absolute;
left:0;
top:0;
}
.minbox li:nth-child(1){
background: url(../img/01.png) no-repeat 0 0;
-webkit-transform:translateZ(50px);
}
.minbox li:nth-child(2){
background: url(../img/02.png) no-repeat 0 0;
-webkit-transform:rotateX(180deg) translateZ(50px);
}
.minbox li:nth-child(3){
background: url(../img/03.png) no-repeat 0 0;
-webkit-transform:rotateX(-90deg) translateZ(50px);
}
.minbox li:nth-child(4){
background: url(../img/04.png) no-repeat 0 0;
-webkit-transform:rotateX(90deg) translateZ(50px);
}
.minbox li:nth-child(5){
background: url(../img/05.png) no-repeat 0 0;
-webkit-transform:rotateY(-90deg) translateZ(50px);
}
.minbox li:nth-child(6){
background: url(../img/06.png) no-repeat 0 0;
-webkit-transform:rotateY(90deg) translateZ(50px);
}
.maxbox li:nth-child(1){
background: url(../img/1.png) no-repeat 0 0;
-webkit-transform:translateZ(50px);
}
.maxbox li:nth-child(2){
background: url(../img/2.png) no-repeat 0 0;
-webkit-transform:translateZ(50px);
}
.maxbox li:nth-child(3){
background: url(../img/3.png) no-repeat 0 0;
-webkit-transform:rotateX(-90deg) translateZ(50px);
}
.maxbox li:nth-child(4){
background: url(../img/4.png) no-repeat 0 0;
-webkit-transform:rotateX(90deg) translateZ(50px);
}
.maxbox li:nth-child(5){
background: url(../img/5.png) no-repeat 0 0;
-webkit-transform:rotateY(-90deg) translateZ(50px);
}
.maxbox li:nth-child(6){
background: url(../img/6.png) no-repeat 0 0;
-webkit-transform:rotateY(90deg) translateZ(50px);
}
.maxbox{
width: 800px;
height: 400px;
position: absolute;
left: 0;
top: -20px;
-webkit-transform-style: preserve-3d;
}
.maxbox li{
width: 200px;
height: 200px;
background: #fff;
border:1px solid #ccc;
position: absolute;
left: 0;
top: 0;
opacity: 0.2;
-webkit-transition:all 1s ease;
}
.maxbox li:nth-child(1){
-webkit-transform:translateZ(100px);
}
.maxbox li:nth-child(2){
-webkit-transform:rotateX(180deg) translateZ(100px);
}
.maxbox li:nth-child(3){
-webkit-transform:rotateX(-90deg) translateZ(100px);
}
.maxbox li:nth-child(4){
-webkit-transform:rotateX(90deg) translateZ(100px);
}
.maxbox li:nth-child(5){
-webkit-transform:rotateY(-90deg) translateZ(100px);
}
.maxbox li:nth-child(6){
-webkit-transform:rotateY(90deg) translateZ(100px);
}
.box:hover ol li:nth-child(1){
-webkit-transform:translateZ(300px);
width: 400px;
height: 400px;
opacity: 0.8;
left: -100px;
top: -100px;
}
.box:hover ol li:nth-child(2){
-webkit-transform:rotateX(180deg) translateZ(300px);
width: 400px;
height: 400px;
opacity: 0.8;
left: -100px;
top: -100px;
}
.box:hover ol li:nth-child(3){
-webkit-transform:rotateX(-90deg) translateZ(300px);
width: 400px;
height: 400px;
opacity: 0.8;
left: -100px;
top: -100px;
}
.box:hover ol li:nth-child(4){
-webkit-transform:rotateX(90deg) translateZ(300px);
width: 400px;
height: 400px;
opacity: 0.8;
left: -100px;
top: -100px;
}
.box:hover ol li:nth-child(5){
-webkit-transform:rotateY(-90deg) translateZ(300px);
width: 400px;
height: 400px;
opacity: 0.8;
left: -100px;
top: -100px;
}
.box:hover ol li:nth-child(6){
-webkit-transform:rotateY(90deg) translateZ(300px);
width: 400px;
height: 400px;
opacity: 0.8;
left: -100px;
top: -100px;
}
@keyframes move{
0%{
-webkit-transform: rotateX(13deg) rotateY(0deg);
}
100%{
-webkit-transform:rotateX(13deg) rotateY(360deg);
}
}
html:
纯CSS实现鼠标经过3D立体动态展示图片特效代码
可放12张照片,在上述目录的img目录下,可换成女友照或生活照,还是很有效果感的
本文至此结束,也希望真心想学的人能有所成,生活是艰苦的,但阳光也总爱出现在风雨后。心向暖阳,何惧寒冬。
个人情感语录:
爱人的手是温暖的,当你遇到对的人时,也要学会勇敢的去表达。爱过,有过方知其珍贵。拿起,放下,方知其不易。
本文参考git开源网站及vsb,html相关学习网站(爱学者,可自行参考)
https://gitee.com/explore
http://www.vbtutor-chinese.net/
https://www.w3school.com.cn/html/index.asp