bootstrap隐藏元素的方法:1、打开相应的代码文件;2、在bootstrap中通过给元素添加“display:none;”或“visibility:hidden;”样式来隐藏元素即可。

本教程操作环境:windows7系统,bootstrap3版本,Dell G3电脑。
显示和隐藏DIV的技巧
使用bootstrap的12分栅来演示
style="display: none;" 隐藏后释放占用的页面空间
document.getElementById("typediv1").style.display="none";//隐藏
document.getElementById("typediv1").style.display="";//显示方法:

style="max-width:90%" 隐藏后不释放空间
document.getElementById("typediv1").style.visibility="hidden";//隐藏
document.getElementById("typediv1").style.visibility="visible";//显示代码:

相关教程推荐:《bootstrap教程》










