[英]Div Resize not working on Internet explorer
我有一個div,我正在通過簡單的css調整大小,該css在chrome,firefox和其他一些瀏覽器上進行了漂亮的調整,但是在Internet Explorer上似乎沒有任何作用。 我將代碼放在下面以對其進行查看,因為我不確定自己缺少什么。 如果可能,我希望將解決方案保留在CSS中,但是如果我需要實現其他功能,則可以選擇其他方法和任何幫助。 謝謝。
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Pragma" content="no-cache">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=yes, width=device-width">
<meta name="HandheldFriendly" content="true">
<meta name="MobileOptimized" content="width">
<style type="text/css">
* { margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; color: #ffffff; background-color: #000000; }
#banner { width: 100%; height: 100%; border: none; overflow: hidden; float:left; z-index:9; }
#BodyContainer { position: absolute; top: 150px; left: 0px; bottom: 0px; right: 0px; clear: both; }
#bottom { width: 100%; height: 100%; border: none; }
.resizable {
resize: vertical;
display: block;
width: 100%;
height: 120px;
border: 2px black;
overflow: hidden;
position: relative;
box-shadow: 1px 1px 1px #33A6A6;
z-index:9;
}
</style>
</head>
<body>
<div></div>
<div class="resizable">
<iframe width="100%" height="100%" id="banner" name="BANNER" src="$BASE$/BANNER?$CONFIG$"></iframe>
</div>
<div></div>
<div id="BodyContainer">
<div></div>
<iframe width="100%" height="100%" id="bottom" name="BODY" src="$BASE$/BODY?$CONFIG$"></iframe>
</div>
</body>
</html>
您正在使用CSS調整div的resize
,IE中尚不支持resize
屬性,如果您想在所有瀏覽器上實現這種效果,那么我建議使用jQuery resizable, 這里有個小提琴來演示如何使用它。
請注意,這需要jQuery和jQuery UI庫。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.