中文乱码的根源在于 windows 基于一些历史原因无法全面支持 utf-8 编码格式,并且也无法通过有效手段令其全面支持。
- 安装
<path to chrome>/chrome.exe --remote-debugging-port=9222
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
google-chrome --remote-debugging-port=9222
在 Web 上应用字体是一项基本技术,同时也是一门艺术。对于英文字体来说可选择的范围实在是太广泛了,合理的使用它们将会为你的网站增色不少。关于英文字体的使用和搭配技巧,在这里不做赘述,只推荐一套非常好的视频:Fundamentals of Design by CodeSchool
而真正的挑战在于中文字体,由于中文字体组成的特殊性导致其体积过于庞大,除了操作系统内置的字体之外,我们很难在网站上应用其他的字体。在可选性很差的前提之下,如何正确的使用中文字体呢?
首先,以下的字体声明都是很糟糕的,切忌使用:
font-family: "宋体";
set nocompatible " use vim defaults | |
set t_RV= " http://bugs.debian.org/608242 | |
" set runtimepath=$VIMRUNTIME " turn off user scripts, https://github.com/igrigorik/vimgolf/issues/129 | |
syntax on " turn syntax highlighting on by default | |
filetype on " detect type of file | |
filetype indent on " load indent file for specific file type | |
set nobackup " do not keep a backup file | |
set novisualbell " turn off visual bell |
import { Promise, defer } from 'rsvp'; | |
import { get } from '@ember/object'; | |
// a mock API response used below | |
const MOCK_PAYLOAD = { | |
person: { | |
id: '1', | |
name: 'Chris', | |
age: 33, | |
father: { |
import Component from '@ember/component'; | |
export default class extends Component { | |
} |
import Component from '@glimmer/component'; | |
import { tracked } from '@glimmer/tracking'; | |
export default class extends Component { | |
@tracked container; | |
constructor(owner, args) { | |
super(owner, args); | |
this.container = this.createContainerElement(); | |
} |
import Controller from '@ember/controller'; | |
import { action, set } from '@ember/object'; | |
import { tracked } from 'tracked-built-ins'; | |
export default class ApplicationController extends Controller { | |
@tracked items = [ | |
{ id: 1, value: 1 }, | |
{ id: 2, value: 2 }, | |
{ id: 3, value: 3 }, | |
]; |