自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 上传前利用canvas图片压缩

【代码】上传前利用canvas图片压缩。

2023-02-24 16:26:55 148

原创 图片上传本地预览

图片上传本地预览

2023-02-23 13:36:59 75

原创 echarts 正负两极 负数正显,多色显示

HTML + js<!-- THIS EXAMPLE WAS DOWNLOADED FROM https://echarts.apache.org/examples/zh/editor.html?c=bar-negative2--><!DOCTYPE html><html style="height: 100%"> <head> <meta charset="utf-8"> </head&gt

2022-04-19 10:31:55 714

原创 echarts 正负条形图将都设置成正数

html + js<!-- THIS EXAMPLE WAS DOWNLOADED FROM https://echarts.apache.org/examples/zh/editor.html?c=bar-background--><!DOCTYPE html><html style="height: 100%"> <head> <meta charset="utf-8"> </head&gt

2022-04-18 16:53:57 711

原创 简单的 css 三角形

<div class="box"></div>向上 .box{ width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 0px solid transparent; border-bottom: 30px solid skyblue;}向下.box{ width:

2022-03-21 11:24:37 58

原创 文本/文字 溢出隐藏使用...代替

单行文本width: 200px;overflow: hidden;white-space: nowrap; //强制一行显示text-overflow: ellipsis;多行文本width: 200px;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3; //显示的行数overflow: hidden;

2022-03-21 10:59:19 73

原创 获取字符串中出现次数最多的字符

使用for循环 var str = 'hjasjhdaduahdluawhuwheduwgyewgrywerdaweddd' function frequency(str) { let obj = {} for(let i = 0; i < str.length; i++) { if(str[i] in obj) { obj[str[i]] += 1

2022-03-21 10:51:29 165

原创 海外 facebook / twitter文章嵌入

(需要科学上网)facebook 嵌入:嵌入代码样式选择(获取):https://www.facebook.com/checkpoint/1501092823525282/?next=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2Fpage-plugintwitter 嵌入:嵌入代码样式选择(获取):https://publish.twitter.com/?buttonType=MentionButton&query=ht

2021-07-06 18:04:28 615

原创 Line与twitter 分享功能

twitter分享<a href="http://twitter.com/share?url=(要分享的网址)+'&text=' + encodeURIComponent(要分享带上的文本)" target="_blank">Twitter</a>encodeURIComponent() 函数可把字符串作为 URI 组件进行编码。可以拼接上 + “%0D%0A” +换行twitter官方文档(需要科学上网)https://developer.twitter.com

2020-09-11 10:15:23 2489

原创 使用html2canvas与canvas2image 实现页面截图

html2canvas 的版本有些不同,我这里使用的是^1.0.0-alpha.12html2canvas官网html2canvas和canvas2image 百度云盘:https://pan.baidu.com/s/1fPUg3EBmGPB5D30QpCZH0w提取码:8qln本文借鉴于https://blog.csdn.net/weixin_39003573/article/details/82467508如有不妥,请联系删除该文章纯属是为了自己保存做的笔记,使用时可能遇到一些问题,请.

2020-06-24 10:15:33 658

原创 垂直水平居中css

方案一 ----已知宽度使用position定位布局 + margindiv{ width: 200px; height: 200px; background: red; position: absolute; left: 0; right: 0; bottom: 0; top: 0; margin: auto;}方案二----transform 元素未知宽度使用position定位布局 + transform : translatediv{ backg

2020-04-11 15:21:38 63

转载 win10使用vagrant安装虚拟机

Vagrant让我们可以通过代码的方式快速地、可重复地创建针对不同虚拟环境的虚拟机。它使得我们可以一次性地、自动创建多个环境相同的虚拟机,对于软件开发和测试尤其有用。https://blog.csdn.net/qq_35255775/article/details/80572356修改vagrantfile文件https://blog.csdn.net/weixin_44957344/art...

2020-01-09 10:12:50 174

转载 ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregate

执行sql语句报错:ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘test.fruits.f_id’ which is not functionally dependent on columns in GROUP BY cl...

2020-01-08 21:17:04 1086

原创 window 安装vagrant 修改 vagrantfile文件

config.vm.provider "virtualbox" do |v|v.memory = 4096v.cpus = 4# Basebox ubuntu/xenial64 comes with following Vagrantfile config and causes https://github.com/joelhandwell/ubuntu_vagrant_boxes/issu...

2019-12-31 17:19:54 1016

原创 JS实现无缝轮播图!!!

animate.js:function animate(obj, target, callback) { clearInterval(obj.timer) obj.timer = setInterval(function () { var step = (target - obj.offsetLeft) / 10 step = (step >...

2019-12-16 11:59:03 199

原创 gcc编译时出现error: stray ‘\357’ in program

error: stray ‘\357’ in programerror: stray ‘\274’ in programerror: stray ‘\214’ in program等等类似的原因是 代码中出现了中文的符号 , 。 } ;等仔细查看代码...

2019-11-13 14:16:53 1017

原创 gcc 编译时implicit declaration of function 'getMin(函数名)'; did you mean 'getline'?

implicit declaration of function ‘getMin(函数名)’; did you mean ‘getline’?在编译时报隐式声明错误的是因为函数未声明被调用函数要先声明,再调用在自己引入的 后缀名为 .h 里面声明函数,切记函数名一定要与调用的函数名一致,否则还是会报隐式声明的错误...

2019-10-16 21:39:32 2520

原创 ubuntu 下载安装最新的版本的node.js

ubuntu 安装最新的版本的node.js先复制官网的下载链接:http://nodejs.cn/download/-使用wget +链接 下载node.js的安装包:sudo wget https://npm.taobao.org/mirrors/node/v12.12.0/node-v12.12.0-linux-x64.tar.xz解压到指定目录1.先建个文件夹,我是用的...

2019-10-16 19:12:09 269

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除