VUE-多元素垂直排列,有一列自动填充
效果图<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Title</title><style&
·
效果图
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
html,body{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
.outer {
width: 100%;
height: 100%;
background: #dcdfe6;
padding-top: 200px;
box-sizing: border-box;
position: relative;
}
.search {
height: 100px;
background: #5daf34;
position: absolute; top: 0 ; left: 0 ; width: 100%;
}
.funtools {
height: 100px;
background: #3a8ee6;
position: absolute; top: 100px ; left: 0 ; width: 100%;
}
.gridPanle {
height: 100%;
background: #4efffb;
}
</style>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript">
function hideSearch(){
$('#search').hide();
$('#funtools').css("top",0);
$('.outer').css("padding-top", "100px");
}
function showSearch(){
$('#search').show();
$('#funtools').css("top",'100px');
$('.outer').css("padding-top", "200px");
}
</script>
</head>
<body>
<div class="outer">
<div id="search" class="search">
search
</div>
<div id="funtools" class="funtools">
funtools
<input type="button" value="隐藏查询栏" onclick="hideSearch()">
<input type="button" value="显示查询栏" onclick="showSearch()">
</div>
<div id="gridPanle" class="gridPanle">
grid
</div>
</div>
</body>
</html>
更多推荐
已为社区贡献10条内容
所有评论(0)