- 博客(34)
- 资源 (4)
- 收藏
- 关注
原创 CSS实现图像旋转动态效果
例如向一个名为img01的类选择器添加旋转样式,在animation属性内设置,旋转动画,rotate为动画名(自定义的名称),6s为周期,linear为线性渐变(取消渐变效果),infinite为无限循环,即每轮动画结束后自动进入下一轮,实现无限旋转效果。.img01{ display: block; animation: rotate 6s linear infinite;} @keyframes rotate{ 0%{ transform: rotateZ(0deg
2021-02-04 15:54:19
971
原创 小程序执行请求,禁止多次点击或者重复点击
/** * 执行请求,禁止多次点击或者重复点击 */function throttle(fn, gapTime) { if (gapTime == null || gapTime == undefined) { gapTime = 1500 } let _lastTime = null // 返回新的函数 return function () { let _nowTime = + new Date() if (_nowTime - _lastTi
2020-12-30 16:29:49
344
原创 边框渐变
box-sizing: border-box;background-clip:padding-box,border-box;background-origin:padding-box,border-box;background-image:linear-gradient(#ffffff,#ffffff),linear-gradient(90deg,#FF5252, #FF1744);
2020-08-29 16:16:42
214
原创 h5合成海报
<script type="text/javascript" src="/js/html2canvas.js"></script><div class="haibao" id="haibaoa"> <section class="haibaotop" id="haibao"> <img class="fe" src="{$pro_info['list_img']}" > <label class=.
2020-08-10 10:23:24
377
原创 h5 禁止微信内置浏览器调整字体大小方法
ios 通过重写样式控制body { -webkit-text-size-adjust:100%!important; } android 通过重写事件控制(function() { if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") { handleFontSize(); } else { if (docume
2020-08-07 14:47:37
834
原创 弹性布局多列换行居左布局,flex布局下两端对齐,不满左对齐
.choujign_img img{ width: 12%; height: 12%; border-radius: 100%; padding: 3px;}.choujign_img img:last-child:nth-child(8n-1) { margin-right: 13%}.choujign_img img:last-child:nth-child(8n-2) { margin-right: 25%}.choujign_img img:last-child:nth.
2020-08-06 13:31:02
1737
原创 H5屏幕宽度大小自适应方式
将宽度固定为750px;通过获取屏幕宽度与750的比例关系将所有样式宽高按照相对应的比例缩放:remChange();window.addEventListener('resize', remChange);function remChange() { remove(); let width = window.screen.width; let fixedw = 750; let scale = width / fixedw; //获取到的屏幕宽度比上自定义的7
2020-08-06 13:29:42
4578
转载 值得收藏的 CSS 形状
1.上三角#triangle-up { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 100px solid red;}2.下三角#triangle-down { width: 0; height: 0; border-left: 50px solid transparen
2020-07-04 10:27:12
158
原创 微信小程序生成分享海报
把components中的canvasdrawer拷贝到自己项目下。 在使用页面注册组件{ "usingComponents": { "canvasdrawer": "/components/canvasdrawer/canvasdrawer" }}在页面**.wxml文件中加入如下代码<canvasdrawer painting="{{painting}}" bind:getImage="eventGetImage"/>painting是需要传...
2020-06-10 14:57:40
615
1
原创 小程序数组去重
var arr = [2,3,4,4,5,2,3,6]; var arr2 = arr.filter(function(element,index,self){ return self.indexOf(element) === index; });console.log(arr2); //[2, 3, 4, 5, 6]
2020-05-29 13:29:56
2232
原创 小程序showToast之延迟跳转和一闪而过的问题
wx.showToast({ title: '成功', icon: 'success', duration: 2000, success:function(){ console.log('haha'); setTimeout(function () { //要延时执行的代码 wx.switchTab({ url: '../user/user' }) }, 2000) //延迟时间 }})...
2020-05-22 14:01:01
1327
原创 小程序实现数据过滤
//根据对应标识获取对应数据var datas= this.data.arrList.filter(function(item){ return item.id == videoindex}) //在进行用findIndex判断获得索引var findIndex= this.data.arrList.findIndex(function(item){return item.id == videoindex}) ...
2020-05-14 15:07:51
1532
转载 只为IE11+写样式
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {}
2019-11-18 15:36:22
304
原创 ajax图片上传
//单图片上传<form id="formTag" enctype="multipart/form-data"> <div class="uploadImgBtn" id="uploadImgBtn"> <input class="uploadImg" type="file" name="file" id="tpfile"> ...
2019-11-08 17:16:48
147
原创 Vue 路由 导航守卫(全局守卫、路由独享守卫)
一.全局守卫回调函数中的参数,to:进入到哪个路由去,from:从哪个路由离开,next:函数,决定是否展示你要看到的路由页面。main.js中设置全局守卫router.beforeEach((to, from, next) => { let isLogin = localStorage.getItem('isLogin') if (to.matched.length ==...
2019-09-29 14:29:37
2088
原创 小程序DES加解密
一、下载crypto-js.js的源代码二、引用和实现app.js var CryptoJS = require("./utils/crypto-js.js"); // 解密 decrypt: function (val) { var value = CryptoJS.DES.decrypt(val, CryptoJS.enc.Utf8.parse('1234567...
2019-09-11 14:19:27
1886
5
原创 uniapp DES加解密
1、打开HBuilderX的视图->显示终端 cd 切换到你项目的根目录 执行命令 npm install crypto-js 安装成功后你的项目根目录会生成node_modules文件夹,里面有crypto-js就说明成功了2、封装一个des.jsimport CryptoJS from '../node_modules/crypto-js/crypt...
2019-08-29 10:08:28
6101
9
原创 php+vue实现微信调用jsdk扫码功能
一、后端获取签名 private $appId = ''; private $appSecret =""; //获取签名 public function getSignPackage() { header('Access-Control-Allow-Origin:*'); //获取url $url = input...
2019-08-12 16:48:57
363
原创 tp5搜索分页带查询
$authentication = input('get.authentication'); $islock = input('get.islock'); $realname = input('get.realname'); $mobile = input('get.mobile'); $stime = input(...
2019-08-12 16:36:09
155
原创 axios 数据请求
1、安装axios和qsnpminstallaxiosnpm install qs2、在vue的项目入口文件main.js中,引入我们所需要axios(已经封装好的ajax,也可以用fetch,但是兼容性不如axios好),同时需要引入qs模块(我们在做post请求的时候需要用到)import axios from 'axios'import qs from 'qs'...
2019-06-25 13:50:27
266
原创 vue DES 加解密
1、安装crypto-jscnpm install crypto-js --save2、封装一个des.jsimport CryptoJS from 'crypto-js'// DES加密export const encryptDes = (message, key) => { const keyHex = CryptoJS.enc.Utf8.parse(key...
2019-06-25 13:43:36
1087
1
原创 php将一个字符串转变成键值对数组
将形式为“name=123&sex=1&num=12”的字符串转换成如下格式的Array( [name] => 123 [sex] => 1 [num] => 12)/* 将一个字符串转变成键值对数组* @param : string str 要处理的字符串 $str ='name=123&sex=1&...
2019-05-16 18:56:27
5175
原创 vue 授权获取微信openId
methods: { getCodeApi(state){//获取code let urlNow=encodeURIComponent(window.location.href); let scope='snsapi_userinfo'; //snsapi_userinfo //静默授权 用户无感知 ...
2019-05-16 17:39:26
4212
1
转载 ×被转义为X的问题
有个参数为timestamp,在url传输中发现×会被转义为X,因为在输出的时候有些字符是有特殊的含义的,比如 “<” ,” >”这些字符在html中一般是标签的开始与结束,所以在输出的时候,浏览器做了转码,查看源码的时候发现是对的,那么要让浏览器显示是我们需要的字符,解决的办法有将×写在参数第一个位置,或者将”&”换成”&”后...
2019-05-16 17:30:32
3015
原创 PHP DES&AES加解密
一、AES-CBC 加密方案<?php$privateKey = "1234567812345678";$iv = "1234567812345678";$data = "Test String";//加密$encrypted = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $privateKey, $data, MCRYPT_MODE_CBC, ...
2019-05-16 17:18:24
575
原创 超出范围隐藏
display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 1;
2019-04-12 10:47:29
527
原创 VueCli3.0 + axios反向代理解决跨域问题
安装 npm install http-proxy-middleware使用在 vue.config.js文件中添加如下代码devServer: {// 设置代理proxy: {"/api": {target: "XXXXX", // 域名ws: true, // 是否...
2019-03-29 15:07:44
1075
原创 Vue CLI 3.0环境搭建
1、全局安装npm install -g @vue/cli2、创建项目 vue create hello-world3、选择特性4、进入项目 cd hello-world5、安装Axiosnpm install axios 将[import AjaxPlugin from './plugins/ajax'/Vue.use(AjaxPlugin)...
2019-03-25 17:23:54
176
原创 无限极分类查询及归类
一、无限极分类查询//函数部分function genTree($items){ $tree = array(); //格式化好的树 foreach ($items as $key=>$item){ $items[$key]['data'] = array(); if (isset($items[$item['parentid']]))...
2019-01-29 13:46:36
2448
1
原创 PHP 日期相关处理,例如:获取本月第一天及最后一天等
//时间相关 public function timeinfo(){ //获取今天0点-24点时间戳 $today = strtotime(date('Y-m-d', time())); $todayend = $today + 24 * 60 * 60; //获取本周第一天及最后一天 $weekfirs...
2019-01-29 10:09:17
879
原创 安装宝塔步骤
一、格式化分区1、.查看是否有数据盘,如图所示,说明有数据盘,大小是10G(也许您的更多)2、创建分区3、.查看分区状态4、格式化/dev/xvdb1分区5、建立/www目录,并挂载分区,并加入开机启动(三步哦)6、查看磁盘状态,用df -h,没问题后,运行reboot,重启一下服务器!7、.登录后再看下磁盘状态,确定数据盘已经被开机挂载,如图所...
2019-01-29 10:01:28
4164
原创 PostgreSQL安装和创建用户和创建数据库
一、安装可以参考postgresql官网安装教程:https://www.postgresql.org/download/linux/redhat/二、创建用户和数据库# su - postgres -- 首先切换到postgres-bash-4.1$ psql -- 输入psqlpsql (10.5)Type "help" for help.postgres=#...
2019-01-28 16:45:50
3392
原创 文字少于一行时居中,超过一行时靠左
文字少于一行时居中,超过一行时靠左##css部分.box{text-align: center;}.text{display: inline-block;text-align: left;}##html部分 文字长度原理:给 p 标签设置 inline-block 后,该标签变成 内联块级元素。根据内联元素的特性,宽度为 auto 默认值时,真实宽度为文本的宽度...
2019-01-19 19:55:33
853
mp_canvas.zip
2020-06-05
SQlite.rar
2019-11-11
DES加密解密
2019-01-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人