Показать сообщение отдельно
  #44 (permalink)  
Старый 11.12.2010, 03:07
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,068

Вmonolithed,
Фокусы Internet Explorer не показывает )))
Вариант фона под любое разрешение ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title></title>
<style type="text/css">
p {
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -50px;
    margin-left: -100px;
    height: 50px;
    width: 300px;
    color: #FFFFFF;
    font-size:  2em;
}
* html p {
    position: absolute;
}
</style>
<script type="text/javascript">
var i = new Image,
    b;

function get(a) {
    var c = document,
        d = c.body,
        e = c.documentElement,
        f = "client" + a;
    a = "scroll" + a;
    return c.compatMode === "CSS1Compat" ? Math.max(e[f], e[a]) : Math.max(d[f], d[a])
}
window.onload = fon;

function fon() {
    i.src = "http://imgs.su/tmp/1292024913.jpg";
    i.style.position = "absolute";
    i.style.left = "0px";
    i.style.top = "0px";
    i.style.width = get("Width") + "px";
    i.style.height = get("Height") + "px";
    i.style.zIndex = -999;
    i.id="img"
    document.body.appendChild(i)
}
window.onresize = function () {
   var i = document.getElementById("img");
   if(i) document.body.removeChild(i);
    window.clearTimeout(b);
    b = window.setTimeout(function () {
        fon()
    }, 20)
};
</script>
</head>
<body>
<p>Всякая всячина</p>
</body>
</html>

Последний раз редактировалось рони, 13.01.2013 в 13:39.
Ответить с цитированием