js中元素隐藏

462 阅读1分钟
  1. 元素.style.display = "none" 不占位置
  2. 元素.style.visibility = "hidden" 保留原来位置
  3. 元素.style.opacity = 0 完全透明,保留原来位置