CSS样式:
- z-index works only when elements are positioned(position:absolute, position:relative, or position:fixed)
-
透明度的设置:
rgba(0,0,0,0.5); //参数分别为r,g,b的值和透明度(0-1)
-
border-radius:
border-radius设置按钮hover白边时使用px效果更好,如
border-radius: 14px; instead of border-radius: 3%;
-
弹性盒子居中父元素样式:
{ display: flex; justify-content: center; align-items: center; flex-direction: column; //设置每项是否占一整行 }
-
导航栏高度固定,其下部高度自适应
{ position: absolute; top: 70px; bottom: 0; }
-
如何使input/textarea获得焦点时光标在最右(即文本内容的最后)?? Element的value赋值为空,再获得焦点,最后将文本内容赋值
var tepm = element.value; element.value = ""; element.focus(); element.value = temp;