div height 自适应高度 占满剩余高度的方法
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
html,
body {
margin: 0;
padding: 0;
height: 100%;
}
.if-top {
display: block;
border: none;
width: 100%;
height: 120px;
}
.if-menu {
width: 20%;
height: 100%;
border: none;
}
.if-content {
width: 78%;
height: 100%;
border: none;
} .div-outer {
height: 100%;
box-sizing: border-box;
padding-top: 100px;
} .div-top {
background-color: burlywood;
height: 100px;
margin-top: -100px;
}
.div-content {
background-color: #8ddad3;
height: 100%;
}
</style>
</head>
<body>
<div class="div-outer">
<div class="div-top">
你好
</div>
<div class="div-content">
世界
</div>
</div>
<!--<iframe class="if-top" src="top.html"></iframe>-->
<!--<iframe class="if-menu" src="menu.html"></iframe>-->
<!--<iframe class="if-content" src="content.html"></iframe>-->
</body>
</html>
这个方法挺好的
div height 自适应高度 占满剩余高度的方法的更多相关文章
- 如何将div高度填满剩余高度
下列代码中navbar高度为30px,content高度需要填满浏览器的剩余高度 <div id="body"> <div id="navbar ...
- css实现div的高度填满剩余空间
css实现div的高度填满剩余空间 .top{ width: 100%; height: 70px;} .bottom{background-color: #cc85d9;width: 100%;po ...
- 关于Linux服务器磁盘空间占满问题的解决方法
下面给大家分享一篇关于Linux服务器磁盘占满问题解决方法(/dev/sda3 满了),需要的的朋友参考下吧 下面我们一起来看一篇关于Linux服务器磁盘占满问题解决(/dev/sda3 满了), ...
- React里单页面div自适应浏览器高度占满屏幕
可以用绝对定位方式,让div占满屏幕,css样式如下: height: 100%; width: 100%; position: absolute; top: 0px; bottom: 0px;
- 【转】CSS实现div的高度填满剩余空间
转自:http://www.cnblogs.com/zhujl/archive/2012/03/20/2408976.html 高度自适应问题,我很抵触用js去解决,因为不好维护,也不够自然,但是纯用 ...
- div 自适应高度 自动填充剩余高度
方案1: Html: <div class="outer"> <div class="A"> 头部DIV </div> &l ...
- 解决css布局时两个div一个宽度固定另一个占满剩余宽度的问题
/*左侧div*/ .left-div{width: 220px;height: 100%;position: fixed;background: #FFFFFF;} /*右侧div*/ .right ...
- html里面,没有内容,要高度占满页面
html { height:100%; margin:0; } body{ width: 100%; height: 100%; background-color: rgb(52,175,245); ...
- 转载 html div三列布局占满全屏(左右两列定宽或者百分比、中间自动适应,div在父div中居底)
原文地址:http://blog.csdn.net/duyelang/article/details/20558899 <p><!DOCTYPE html> <html ...
随机推荐
- Two Sum【LeetCode】
Given an array of integers, return indices of the two numbers such that they add up to a specific ta ...
- java 解析域名得到host
// 形如https://www.baidu.com 或 www.baidu.com, 判断这两种情况,并解析前者去掉http头,传入domain host // 方案1:正则表达式 + URI解析方 ...
- Visual Studio 2012 Update 3
不知道是不是都关注Win8.1和Visual Studio 2013 preview去了… 貌似没大有人发现2012的update3在update2后2月就出了… ms明显加快了开发速度额… KB a ...
- es6 Map,Set 和 WeakMap,WeakSet
这些是新加的集合类型,提供了更加方便的获取属性值的方法,不用像以前一样用hasOwnProperty来检查某个属性是属于原型链上的呢还是当前对象的.同时,在进行属性值添加与获取时有专门的get,set ...
- (4).NET CORE微服务 Micro-Service ---- Consul服务发现和消费
上一章说了 Consul服务注册 现在我要连接上Consul里面的服务 请求它们的API接口 应该怎么做呢? 1.找Consul要一台你需要的服务器 1.1 获取Consul下的所有注册的服务 u ...
- JMeter非GUI模式下日志介绍
Creating summariser <summary> Created the tree successfully using /opt/JMeter/TestPlan/test.jm ...
- eclipse启动web应用 报错
错误:The origin server did not find a current representation for the target resource or is not willing ...
- jenkins(8): 实战jenkins+gitlab持续集成发布php项目(代码不需要编译)
一. jenkins 的配置 1.前提条件安装了GitLab Plugin (源码管理使用),GitLab Hook(gitlab webhook需要) Manage Jenkins--->Ma ...
- 关于window.open窗口的resize事件
jQuery 事件 - resize() 方法 当调整浏览器窗口的大小时,发生 resize 事件. resize() 方法触发 resize 事件,或规定当发生 resize 事件时运行的函数. & ...
- P2024 [NOI2001]食物链 并查集
题目描述 动物王国中有三类动物 A,B,C,这三类动物的食物链构成了有趣的环形.A 吃 B,B 吃 C,C 吃 A. 现有 N 个动物,以 1 - N 编号.每个动物都是 A,B,C 中的一种,但是我 ...