Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Dieguinhu Web

scrolling

Recommended Posts

NÃO ESTOU CONSEGUINDO FAZER O SCROLLING D AMINHA PAGINA COM LIGHT BOXO CODIGO:

<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Efeito para Imagens</title><style type="text/css">body {    margin: 0px;        /*removendo margem*/    overflow: hidden;    /*removendo scroll*/}#transparentBackground {    width: 100%;    height: 100%;    background:#0;    position: absolute;}#fotoContainer {    background: #FFF;    position: absolute;}#fotoContainer img {    margin: 10px;    cursor: pointer;}#thumbs {    width: 390px;    text-align: center;    vertical-align: middle;}#thumbs img {    cursor: pointer;    float: left;    width: 120px;    height: 90px;    margin: 4px;    border: 1px solid #000;}</style><script type="text/javascript">var $ = function(string) {    return document.getElementById(string);};var loading = new Image();loading.src = 'loading.gif';var toLoad = new Image();var openImage = function(src) {    var image = $('showPhoto');    var imageC = $('fotoContainer');    var backDiv = $('transparentBackground');    	document.getElementById('divflash').style.visibility = 'hidden';    imageC.style.width = '52px';    imageC.style.height = '52px';        setAlpha(backDiv, 0);    centerObj(imageC);        image.src = loading.src;    imageC.style.display = '';    backDiv.style.display = '';        image.onclick = function() {        closeImage(backDiv, imageC);    };        backFade(backDiv, 0, 80);        toLoad.src = src;        verifyImage(image, image, function() {expand.call(this, toLoad, image, imageC);});};var closeImage = function(backDiv, imageC) {	document.getElementById('divflash').style.visibility = 'visible';    imageC.style.display = 'none';    backFade(backDiv, 80, 0);};var verifyImage = function(image, imageIn, cb) {    if(image.complete) {        cb.call(this);        //imageIn.src = '';    } else        setTimeout(function() {verifyImage.call(this, image, imageIn, cb);}, 20);};var expand = function(image, imageIn, container) {    var vel = 10;        var w1 = image.width + 20;    var h1 = image.height + 20;        var w2 = parseInt(container.style.width);    var h2 = parseInt(container.style.height);        var dw = w1 - w2;    var dh = h1 - h2;        var dt = Math.max(dw, dh);    var steps = Math.ceil(dt / vel);        var wpos = [];    var hpos = [];        for(var i = 0; i < dt; i += steps) {        var pct = i / dt;        wpos[wpos.length] = Math.round(dw * pct) + w2;        hpos[hpos.length] = Math.round(dh * pct) + h2;    }        i -= vel;        if(i < dt) {        wpos[wpos.length] = w1;        hpos[hpos.length] = h1;    }        doExpand.call(this, container, image, imageIn, wpos, hpos, 0);};var doExpand = function(obj, image, imageIn, wpos, hpos, index) {    var newpos = centerObj(obj, wpos[index], hpos[index], true);        obj.style.width = wpos[index] + 'px';    obj.style.height = hpos[index] + 'px';    obj.style.left = newpos.x + 'px';    obj.style.top = newpos.y + 'px';        index++;        if(index < wpos.length) {        setTimeout(function() {doExpand.call(this, obj, image, imageIn, wpos, hpos, index);}, 30);    } else {        imageIn.src = image.src;    }};var backFade = function(obj, from, to) {    if(to > from) {        from += 22;                if(from > to)            from = to;    } else {        from -= 22;                if(from < to)            from = to;    }        setAlpha(obj, from);        if(from == 0)        obj.style.display = 'none';        if(from != to)        setTimeout(function() {return backFade.call(this, obj, from, to);}, 30);};var getAlpha = function(obj) {    if(obj.filters)            return obj.style.filter.alpha.opacity;        if(obj.style.mozOpacity)        return obj.style.MozOpacity * 100;        return -1;};var setAlpha = function(obj, value) {    if(value > 100)        value = 100;            if(value < 0)        value = 0;        if(obj.filters)    {        obj.style.filter = 'alpha(opacity=' + value + ')';        return;    }        obj.style.MozOpacity = Math.min(0.99, value / 100);};var centerObj = function(obj) {    var getBack = !!(arguments[3]);        var wx = document.body.offsetWidth;    var wy = document.body.offsetHeight || window.innerHeight;        var w = arguments[1] || parseInt(obj.style.width);    var h = arguments[2] || parseInt(obj.style.height);        var px = Math.round(wx / 2 - w / 2);    var py = Math.round(wy / 2 - h / 2);        if(getBack)        return {x: px, y: py};    else {        obj.style.left = px + 'px';        obj.style.top = py + 'px';    }};</script></head><body bgcolor="#333333" ><div id="transparentBackground" style="display: none;"></div><div id="fotoContainer" style="display: none; width: 100px; height: 100px;">    <table width="100%" height="100%" cellspacing="0" cellpadding="0" scrolling="true">        <tr>            <td align="center"><img src="" id="showPhoto" /></td>        </tr>    </table></div><div id="divflash"><center>      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="766" height="700" hspace="100">      <param name="movie" value="index.swf">      <param name="quality" value="high">      <embed src="index.swf" width="766" height="700" hspace="100" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object>  </center></div></body></html>

O SITEWWW.PROTESEMALFATTI.COM

Compartilhar este post


Link para o post
Compartilhar em outros sites

Você já analisou a linha 9 do seu código?

 

...

overflow: hidden; /* removendo scroll */

...

 

Isso significa que o conteúdo que ficar fora da área visível da janela no navegador não poderá ser visto.

tente incluir a linha

scrolling: auto;

 

Se não resolver, retire a linha overflow.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Isso significa que o conteúdo que ficar fora da área visível da janela no navegador não poderá ser visto.

tente incluir a linha

scrolling: auto;

overflow:auto;

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.