Clarity
Home
Archives
About
Tools icon
clock qrcode
English Português
  • CSS多行文本溢出显示省略号显示点点点...

    Jun 28, 2020 · 2 min read · css 文本溢出  ·
    Share on:

    一、单行省略 1<div class="elip w100" style="border: 1px solid #5184f6;"> 2 两个黄鹂鸣翠柳,一行白鹭上青天。窗含西岭千秋雪,门泊东吴万里船。 3</div> 1/* 单行文本溢出省略 */ 2.elip { 3 overflow: hidden; /* 隐藏溢出内容 */ 4 white-space: nowrap; /* 不换行,强制文本在一行显示 */ 5 text-overflow: ellipsis; /* 溢出的部分进行省略 */ 6} 7.w100 { 8 /* 设置宽度,一定不要忘了 */ 9 …

    Read More
  • Get the Beginning and Ending in a Unit of Time via Momentjs

    Nov 19, 2019 · 4 min read · momentjs  ·
    Share on:

    根据 moment.js 得到一个单位时间或者时间段(如本周,上周,本月,上月,当前季度,上个季度)的开始结束时间 momentjs 文档 主要利用以下几项 API: format(): 得到格式化的时间 startOf(): 得到一个单位时间的开始时间点, 文档 endOf(): 得到一个单位时间的结束时间点 add(): 在指定时间点的基础上,加上一个时间段 subtract(): 在指定时间点的基础上,减去一个时间段 week(): 获取或设置一个时间对象的周数(第几周) month(): 获取或设置一个时间对象的月份 quarter(): 获取或设置一个时间对象的季度 天 1// …

    Read More
  • Basic Setup for Ubuntu

    Nov 17, 2019 · 3 min read · ubuntu  ·
    Share on:

    Ubuntu 基础设置,包含一些常用软件安装,配置文件修改等等。 这篇文章的意义在于,当你拿到一个新的 Ubuntu 系统之后,直接按照本文的步骤进行设置,就可以得到一个顺手的开发/部署环境。不再需要逐项搜索每个软件的安装步骤了。 设置国内软件镜像源 node git docker nginx oh-my-zsh alias vim 设置系统软件镜像源 配置系统源第一件事是修改镜像源,这样方便后续其他软件的安装。在国内可以选择阿里云的源。 1# 编辑源文件 2sudo vim /etc/apt/sources.list 3# 在VIM编辑器内替换默认源为阿里云 4:0,$ …

    Read More
  • Basic Usage of Docker

    Nov 16, 2019 · 1 min read · docker  ·
    Share on:

    使用脚本快速安装 安装 Docker: 1curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh 安装 docker-compose 1sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" \ 2-o /usr/local/bin/docker-compose 3 4# 给Docker Compose 执行权限 5sudo chmod …

    Read More
  • Nginx 的安装和基本命令 | Basic Usage of Nginx

    Nov 16, 2019 · 1 min read · nginx  ·
    Share on:

    安装 1# ubuntu 2sudo apt install nginx -y 命令 nginx 命令 描述 命令 命令二 启动 sudo nginx sudo /usr/sbin/nginx 停止 sudo nginx -s stop sudo /usr/sbin/nginx -s stop 重启 sudo nginx -s restart sudo /usr/sbin/nginx -s restart 重载配置文件 sudo nginx -s reload sudo /usr/sbin/nginx -s reload nginx 目录 描述 命令 nginx …

    Read More
  • 总结 JavaScript 中的 this 指向问题

    Sep 29, 2019 · 4 min read · JavaScript this指向  ·
    Share on:

    初学 JavaScript 的时候,时常对于代码中 this 的值感到困惑,因为 JavaScript 中的 this 的值总是不确定的,每次都要将 this 的值打印出来才能放心。 实际上 this 具体指向哪个对象是在函数运行时的环境动态绑定的,而非函数被声明时的环境。 尽管如此,总还是有规律可循的,我们可以将 this 的场景大致分为下面 5 种: 作为普通函数调用 作为对象的方法调用 作为构造器调用 通过 call 和 apply 调用 箭头函数 在 ES6 标准新增的箭头函数中的 this 是由被声明的环境即上下文来确定的。 情况一:作为普通函数调用 这可能是我们学习过程中最先接触到的一种函数类型。 1) 普通函 …

    Read More
  • Markdown Syntax Guide

    Mar 11, 2019 · 3 min read · markdown css html themes featured  ·
    Share on:
    Markdown Syntax Guide

    This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.

    Read More
  • Rich Content

    Mar 10, 2019 · 1 min read · shortcodes privacy  ·
    Share on:
    Rich Content

    Hugo ships with several Built-in Shortcodes for rich content, along with a Privacy Config and …

    Read More
  • Placeholder Text

    Mar 9, 2019 · 2 min read · markdown text  ·
    Share on:

    Lorem est tota propiore conpellat pectoribus de pectora summo.

    Read More
  • Math Typesetting

    Mar 8, 2019 · 1 min read  ·
    Share on:

    Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.

    Read More
    • ««
    • «
    • 1
    • 2
    • 3
    • »
    • »»

wencaizhang

前端开发.
Read More

Featured Posts

  • Markdown Syntax Guide

Recent Posts

  • 用 Docker 快速架设一个 Anki 同步服务器
  • echarts
  • Using Notices
  • 将两次 Git 提交合并为一次
  • 封装日期相关函数
  • Vue.js 项目中二次封装一个按钮组件
  • Git 秘钥
  • 封装简易 DOM 选择器

Categories

MINICODE 9 其他 6 GIT 2 设计模式 2 BUG-FIX 1 CSS 1 JS 1 OTHER 1 SYNTAX 1 THEMES 1 VUE 1 工具 1

Series

设计模式 2 THEMES-GUIDE 1

Tags

JAVASCRIPT 8 CSS 4 DOM 3 GIT 3 日期 3 DOCKER 2 MARKDOWN 2 NGINX 2 代码重构 2 其他 2 工具 2 ANKI 1 EMOJI 1 FEATURED 1
All Tags
ANKI1 CSS4 DOCKER2 DOM3 EMOJI1 FEATURED1 GIT3 HTML1 INDEX1 JAVASCRIPT8 MARKDOWN2 MOMENTJS1 MP-HTML1 NGINX2 PLACEHOLDER1 PRIVACY1 PROMISE1 SCROLLBAR1 SHORTCODES1 TEXT1 THEMES1 THIS指向1 UBUNTU1 UNIAPP1 VUE1 代码重构2 其他2 备忘1 工具2 开源库1 文本溢出1 日期3 源码1 组件1 责任链模式1 适配器模式1
[A~Z][0~9]
Clarity

Copyright  CLARITY. All Rights Reserved. 感谢 又拍云  提供 CDN 支持