Skip to main content

90 posts tagged with "Technology"

View All Tags

Nginx 基础命令

· 2 min read
Kimi Gao
Fullstack & AI

Linux Nginx 配置文件在 /etc/nginx/sites-available/default

安装

sudo apt install nginx # ubuntu

Ubuntu 安装之后的文件结构大致为:

  • 所有的配置文件都在 /etc/nginx 下,并且每个虚拟主机已经安排在了/etc/nginx/sites-available
  • 程序文件在 /usr/sbin/nginx
  • 日志放在了 /var/log/nginx
  • 并已经在 /etc/init.d/ 下创建了启动脚本 nginx
  • 默认的虚拟主机的目录设置在了 /var/www/nginx-default (有的版本 默认的虚拟主机的目录设置在了/var/www, 请参考 /etc/nginx/sites-available 里的配置)

CSS 像素探讨

· 7 min read
Kimi Gao
Fullstack & AI

物理像素与独立像素

px 像素(Pixel),相对长度单位。本来 px 还是很好理解的,但是由于 Retina 屏让 px 变得扑所迷离,也是在移动端 Web 开发的时候不得不跨越的一个坎。我们先了解一下两个概念:

  • 物理像素(实际像素):即小格子,是各个厂家所宣称的屏幕分辨率,比如:2880x1800,Retina 屏所说的像素就是物理实际像素。
  • 独立像素:即大格子,是 JS/CSS 所认为的像素
    • 非 Retina 屏 独立像素 = 物理像素
    • Retina 屏 独立像素 < 物理像素

Responsive & Adaptive Design

· 3 min read
Kimi Gao
Fullstack & AI

Online demo: http://www.liquidapsive.com

Basic Concept

Before introduction on responsive and adaptive design, let's start by Static and Liquid which are basis of responsive and adaptive design.

Static

Static layouts are the traditional web: one design that sits in the center of the page and requires horizontal scrolling if the window is too small for it. M dot sites (m. site is a website that's specifically designed for mobile devices, and exists on a separate subdomain) are the traditional answer to this, providing a wholly separate site for a lower resolution - and all the work of creating a separate site.