研究了一下div+css的高度自适应问题
div+css还是比较难搞的,要实现上下两个div高度自适应感觉麻烦,查了下资料只找到上下高度都是百份比的是可以的,我要实现上面的div是具体像素高度,下面是自适应剩余的百份比。自己搞了一下还要用上js,不知道是不是很笨,有好的方法请大家帖出来。
<body style=”height:100%; margin:0px; width:100%;”>
<div id=”ddii22″ style=” background-color:#ffffff; height:110px; position:absolute; left:0px; top:0px; width:100%; z-index:1000″>
1111111111111111
</div>
<div id=”ddii” style=” background-color:#999999; height:100%; position:absolute; left:0px; top:110px; width:100%; z-index:100″>
<div style=”height:100%; overflow:auto; “>
</div>
</div>
<script type=”text/javascript”>
document.getElementById('ddii').style.height = document.getElementById('ddii').clientHeight-110 + ‘px';
</script>
</body>
<body style=”height:100%; margin:0px; width:100%;”>
<div id=”ddii22″ style=” background-color:#ffffff; height:110px; position:absolute; left:0px; top:0px; width:100%; z-index:1000″>
1111111111111111
</div>
<div id=”ddii” style=” background-color:#999999; height:100%; position:absolute; left:0px; top:110px; width:100%; z-index:100″>
<div style=”height:100%; overflow:auto; “>
</div>
</div>
<script type=”text/javascript”>
document.getElementById('ddii').style.height = document.getElementById('ddii').clientHeight-110 + ‘px';
</script>
</body>
做网页字体大小参考 网页中同字号字体的不同单位对比列表
对于WEB前端页面开发,字体大小的设置是比较重要,这里找到了一些关于字号大小的数据,共享出来备以后参考,也希望能对大家有用!PointsPixelsEmsPerce
css 之 background-position-x
divstyle="width:300px;height:300px;background-image:url(http://www.dnew.cn/template/4color/images/green.png);background-position-x:100"/div只能background-position:1000这样来写
css实现兼容各个浏览器的技巧的代码
在编写css样式表的时候常常会碰到一写浏览器兼容的问题,象是不同内核的浏览器显示就不一定相同,不同版本的的浏览器也会产生上下兼容的问题,
