一、HTML
h, p, a(href(#id), target(_self,_blank)),SEO
base, lang, img(width, height, src, alt)
ul>li, dl>dt>dd dd
< > " &
strong, em, ins, del
b, i, u, s
div + span
二、CSS
1、内联样式、内部样式、外部样式
选择器 { 属性名称: 属性值; }
2、text, font, color, background, vertical-align, inline, block, inline-block, white-space, word-break
text: -align(left,cetner,right,justify);
-indent(2em);
-decoraction(overline, line-through, underline, none);
font: style weight size/line-height family;
(normal, italic, oblique) (lighter, light, normal, bold, bolder 100-400-600)
color: rgba(0, 0, 0, .5), #ffff00, red;
background: color url repeat position/size;
(no-repeat, repeatX, repeatY, repeat:↔ ↕ ) (→ ↓)/(↔ ↕)
vertical-align: top; middle; bottom; baseline;
top: 把元素的顶端与行中最高元素的顶端配齐;
middle: 把此元素放置在父元素的中部;(实测有差异,需酌情细究)
bottom: 把元素的顶端与行中最低元素的顶端对齐。
baseline: 默认值。元素放置在父元素的基线上。
inline元素、block元素、inline-block元素
white-space: pre; // 保留回车和空格并且不会自动换行
white-space: pre-line; //保留回车,多个连续的空格只保留一个,且会自动换行
white-space: pre-wrap; //保留回车、所有的空格,并且会自动换行
white-space: nowrap; //强制不换行
// word-break针对非CJK脚本的断行规则(CJK脚本是中国,日本和韩国("中日韩")脚本)
word-break: break-all; //允许在单词内换行
3
React通常在组件的父级重新渲染时重新渲染组件。作为优化,你可以创建一个组件,只要其新props和state与旧props和state相同,React就不会在其父级重新渲染时重新渲染该组件。类组件可以通过扩展PureComponent来选择这种行为: