Skip to content

Instantly share code, notes, and snippets.

View magicianShiro's full-sized avatar
🏠
Working from home

NAVI magicianShiro

🏠
Working from home
View GitHub Profile
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy http://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@magicianShiro
magicianShiro / clipboard.js
Last active October 25, 2019 03:30
复制文本
export default (function clipboard(document) {
let textArea;
// 创建文本元素
function createTextArea(text) {
textArea = document.createElement('textArea');
textArea.setAttribute('readonly', true);
textArea.value = text;
document.body.appendChild(textArea);
@magicianShiro
magicianShiro / index.scss
Created April 30, 2019 15:52
基础scss设置
body, html, p, h1, h2, h3, h4, h5, h6, ul, li {
margin: 0;
padding: 0;
}
// 以下三个是实现滚动条不占位的代码
html {
overflow-y: scroll;
}
@magicianShiro
magicianShiro / safari.css
Created February 23, 2019 06:38
safari想点击底部按钮的时候总是会触发底部栏弹出导致点击失败的解决方案
[参考链接](https://www.eventbrite.com/engineering/mobile-safari-why/)
在按钮元素上加上如下属性
/* Allows content to fill the viewport and go beyond the bottom */
height: 100%;
/* Allows you to scroll below the viewport; default value is visible */
overflow-y: scroll;
/* To smooth any scrolling behavior */
-webkit-overflow-scrolling: touch;
@magicianShiro
magicianShiro / .eslintrc.js
Created January 12, 2019 12:27
vue-cli3.0 eslint配置(主要是eslint-plugin-vue插件)
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'@vue/standard',
'@vue/typescript'
],
@magicianShiro
magicianShiro / _mixin.scss
Last active November 23, 2018 04:00
scss 的一些mixin
@mixin placeholder($fontSize: 16px, $color: rgba(153,153,153,0.54)) {
&::-webkit-input-placeholder{
color: $color;
}
&:-moz-placeholder {
color: $color;
}
&::-moz-placeholder {
color: $color;
}
@magicianShiro
magicianShiro / reset.css
Created November 1, 2018 10:56
移动端 reset.css
* {
-webkit-tap-highlight-color: transparent;
}
*,
*::after,
*::before {
box-sizing: border-box;
}
html,
@magicianShiro
magicianShiro / ripple.js
Created November 1, 2018 10:55
vue 水波纹指令
export default {
inserted (el, binding, vnode) {
vnode.context.$nextTick(() => {
let ripple = new Ripple({ el, binding })
ripple.addEvent()
})
},
update (el, binding, vnode) {
vnode.context.$nextTick(() => {
let ripple = new Ripple({ el, binding })
@magicianShiro
magicianShiro / button.wxss
Created October 22, 2018 08:37
小程序中去掉button默认样式
/* button 去除默认样式 */
button::after {
border: none;
}
button {
border-radius: 0;
line-height: 1;
background-color: transparent;
}
.button-hover {
@magicianShiro
magicianShiro / circle.html
Created September 10, 2018 09:59
css绘制没有缝隙的圆形进度条--非clip
<html>
<head>
<title>Parcel Sandbox</title>
<meta charset="UTF-8" />
</head>
<style>
.circle_process{
position: relative;
width: 200px;
height : 200px;