Bootstrap4显示和隐藏元素

Update for Bootstrap 4 (2018)

The hidden-* and visible-* classes no longer exist in Bootstrap 4. If you want to hide an element on specific tiers or breakpoints in Bootstrap 4, use the d-* display classes accordingly.

Remember that extra-small/mobile (formerly xs) is the default (implied) breakpoint, unless overridden by a larger breakpoint. Therefore, the -xs infix no longer exists in Bootstrap 4.

Show/hide for breakpoint and down:

hidden-xs-down (hidden-xs) = d-none d-sm-block
hidden-sm-down (hidden-sm hidden-xs) = d-none d-md-block
hidden-md-down (hidden-md hidden-sm hidden-xs) = d-none d-lg-block
hidden-lg-down = d-none d-xl-block
hidden-xl-down (n/a 3.x) = d-none (same as hidden)

Show/hide for breakpoint and up:

hidden-xs-up = d-none (same as hidden)
hidden-sm-up = d-sm-none
hidden-md-up = d-md-none
hidden-lg-up = d-lg-none
hidden-xl-up (n/a 3.x) = d-xl-none

Show/hide only for a single breakpoint:

hidden-xs (only) = d-none d-sm-block (same as hidden-xs-down)
hidden-sm (only) = d-block d-sm-none d-md-block
hidden-md (only) = d-block d-md-none d-lg-block
hidden-lg (only) = d-block d-lg-none d-xl-block
hidden-xl (n/a 3.x) = d-block d-xl-none
visible-xs (only) = d-block d-sm-none
visible-sm (only) = d-none d-sm-block d-md-none
visible-md (only) = d-none d-md-block d-lg-none
visible-lg (only) = d-none d-lg-block d-xl-none
visible-xl (n/a 3.x) = d-none d-xl-block

Demo of the responsive display classes in Bootstrap 4
Also, note that d-*-block can be replaced with d-*-inline, d-*-flex, d-*-table-cell, d-*-table etc.. depending on the display type of the element. Read more on the display classes

Bootstrap4显示和隐藏元素

Reference: https://stackoverflow.com/questions/35351353/missing-visible-and-hidden-in-bootstrap-v4

怎么上传项目到github及git常用命令

初始化一个空仓库

git init

关联远程仓库

git remote add origin [url]

拉取远程内容

git pull

将远程仓库复制至到本地

git clone [url]

推送本地内容到远程仓库

git push origin master

添加到缓存区

git add . #把新增的、修改的都加到缓存
git add -u #把修改的、删除的都加到缓存
git add -A #把新增、修改的、删除的都加到缓存

把缓存区的所有内容提交到当前分支

git commit -m '本次提交的备注'

查看当前git状态信息(查看是否有文件未提交)

git status

第一次关联远程仓库时需配置授权

创建SSH Key (需要生成 id_rsa私钥 和 id_rsa.pub公钥两个文件)
登录GitHub,复制 id_rsa.pub 内容至SSH Key,可允许添加多个SSH。

ssh-keygen -t rsa -C "youremail@example.com"

设置账号和邮箱

git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

查看git的配置信息

git config -l

设置token

// <your_token>:包括<>在内的全部字符替换成你的token
// <USERNAME>:包括<>在内的全部字符替换成你的username
// <REPO>:包括<>在内的全部字符替换成你要访问的仓库名称
git remote set-url origin  https://<your_token>@github.com/<USERNAME>/<REPO>.git