zhangmengxue / frontendlibrary Goto Github PK
View Code? Open in Web Editor NEW前端开发中各种问题和技巧随手记,涨姿势
前端开发中各种问题和技巧随手记,涨姿势
sudo python -m SimpleHTTPServer 80
可以添加样式 :
input[type="text"] {
-webkit-appearance: none;
}
// eslint-disable-line
单独给 img 标签设置 border-radius 在某些机器上不生效。需要配合 div 标签包裹实现。
相关问题参考:border-radius 移动端兼容
除了要引入一般的浏览器重置样式,
还可以参考:
disable-orange-outline-highlight-on-focus
ssh-add ~/.ssh/YOUR_ID
::-webkit-scrollbar {
width: 13px;
height: 13px;
}
::-webkit-scrollbar-track {
background-color: transparent;
} /* the new scrollbar will have a flat appearance with the set background color */
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
} /* this will style the thumb, ignoring the track */
::-webkit-scrollbar-button {
background-color: rgba(0, 0, 0, 0.3);
}
有时候端口监听的时间长了,关闭命令行窗口也关不掉监听的端口。这时候就需要手动关闭一下了:
先执行:
lsof -i:端口号
然后会得到当前端口占用信息:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 23611 yixuan 16u IPv6 0x31d85b0daa406a31 0t0 TCP *:8010 (LISTEN)
然后kill掉对应的 pid 即可:
kill -9 23611
外层父元素定高,在ios7,8下元素内容的滚动高度offsetHeight和clientHeight值都不会随着滚动而改变。需要使用scrollHeight来获取。
1.编写一个javscript函数 fn,该函数有一个参数 n(数字类型),其返回值是一个数组,该数组内是 n 个随机且不重复的整数,且整数取值范围是 [2, 32]。
在 iOS 中只能解析其中的 / 格式的日期(若为-形式则会出现 NaN):
new Date('2016/11/01 00:00:00').getTime()
可借助:::-webkit-scrollbar 属性实现:
解析 github base64 md 文件为正常的html显示;
const htmlStr = marked(b64_to_utf8(str))
function b64_to_utf8(str) {
return decodeURIComponent(escape(window.atob(str)));
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.