اكتشف عرض الشاشة وضبط المعرف على عرض DIV للإطار. اضبطه وفقًا لأقصى عرض لصفحة الويب الخاصة بك. الحد الأقصى لعرض العرض التوضيحي الصغير هو 1440
نسخة الكود كما يلي:
<! doctype html public "-// w3c // dtd xhtml 1.0 transitional // en"
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text /html ؛ charset = utf-8" />
<title> Unted Document </title>
<script src = "js/jquery.min.js" type = "text/javaScript"> </script>
<script>
وظيفة onwidthchange () {
var w = $ (window) .width () ؛
x = (W-1440)/2 ؛
$ ("#frame"). css ("width" ، w) ؛
if (w <1024) {
$ ("#frame"). css ("Overflow" ، "Visible") ؛
$ ("#webcontent"). css ("margin-left" ، x) ؛
} آخر إذا (1024 <w <1440) {
$ ("#frame"). css ("Overflow" ، "Hidden") ؛
$ ("#webcontent"). css ("margin-left" ، x) ؛
}
setTimeout (onWidThChange ، 0) ؛
} ؛
</script>
</head>
<body>
<div id = "frame" style = "Overflow: Hidden ؛">
<div id = "WebContent">
//محتوى
</div>
</div>
</body>
</html>