Skip to content

Instantly share code, notes, and snippets.

View pluscai's full-sized avatar
🎯
Focusing

caishuxiang pluscai

🎯
Focusing
View GitHub Profile
@pluscai
pluscai / index.html
Last active October 11, 2019 08:30
不定宽高的图片如何在div中水平垂直居中
<h2>不定宽高的图片如何在div中水平垂直居中</h2>
方法1:
<div class="box wraper">
<img src="http://cdn.jsrun.top/css/img/logo.png" alt="" />
</div>
方法2:
<div class="box wraper2">
<img src="http://cdn.jsrun.top/css/img/logo.png" alt="" />
</div>
<h2>多行文本如何在div中水平垂直居中</h2>
@gaearon
gaearon / npm_init_error.md
Created June 28, 2018 00:53
What to do when npm init -y fails

If you get an "Invalid name" error when you run npm init -y, rename the project folder to only contain lowercase ASCII letters or hyphens (e.g. my-project), and try again.