jquery将标签元素的高设为屏幕的百分比
2016年11月30日
作者:mdxy-dxy
html部分:
<body> <div id="margin_box"></div> </body>
jquery部分:
<script> $(function(){ var percent =0.15; $("#margin_box").css("height",window.document.body.clientHeight*percent) }) </script>
html部分:
<body> <div id="margin_box"></div> </body>
jquery部分:
<script> $(function(){ var percent =0.15; $("#margin_box").css("height",window.document.body.clientHeight*percent) }) </script>