ورود

View Full Version : ریسپانسیو کردن ارتفاع بادی



sohail0098
دوشنبه 19 خرداد 1393, 15:00 عصر
سلام
چه طوری میشه ارتفاع بادی رو ریسپانسیو کرد؟


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>First Sample</title>
<link rel="stylesheet" type="text/css" href="Styles/Style.css" />
<script src="jquery.min.js"></script>
<script>
$(document).ready(function () {
var w, h;
w = $(document).width().toString();
h = $(document).height().toString();
alert(w + ":::::" + h);
$(body).css("background-color", "yellow");
//$("#main").css("width", w);
$("#main").css("height", h);
});
</script>
</head>
<body style="width:100%;height:100%;">
<div id="main">
<div id="content" style="width:100%;height:100%;background-color:yellow;">
ddd
d
<pre>
asd
d
d
d
d

</pre>
</div>

</div>
</body>
</html>




body {
position: relative;
margin: 0px;
padding: 0;
width: 100%;
height: 100%;
display: block;
/*background-color: seagreen;*/
overflow: hidden;
}

#main {
background-color: red;
display: block;
position: relative;
margin: 0;
padding: 0;
/*min-width:100%;*/
}



میخام وقتی روی صفحه زوم میدم بازم سایز بادیم درست باشه
ولی رنگ بک کراندش وقتی سایز رو کوچیک می کنیم کار نمی کنه