Foros del Web » Programación para mayores de 30 ;) » Java »

Sitio Web scroll con java

Estas en el tema de Sitio Web scroll con java en el foro de Java en Foros del Web. Buenas tardes muchachos !! Les escribo estas líneas para hacer una consulta. Tengo dos plantillas: una tiene el scrol que va hacia la derecha (tipo ...
  #1 (permalink)  
Antiguo 20/01/2012, 19:54
Avatar de ryu100ar  
Fecha de Ingreso: enero-2012
Ubicación: Ciudad Autonoma de Buenos AIres
Mensajes: 1
Antigüedad: 12 años, 2 meses
Puntos: 0
Pregunta Sitio Web scroll con java

Buenas tardes muchachos !!
Les escribo estas líneas para hacer una consulta. Tengo dos plantillas: una tiene el scrol que va hacia la derecha (tipo Windows 8). La otra plantilla hace un scroll hacia abajo. Los dos utilizan Jquery. Quisiera hacer una mezcla de cada página, y que los internautas al hacer click en siguiente vayan a la derecha, después hacia abajo, tipo escalera. El asunto es que no se como se hace . Me imagino que es más complicado que copiar y pegar. S me ayudan, se los agradeceré.
Saludos !!!
El codigo del scroll hacia la derecha
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Website Horizontal Scrolling with jQuery</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="description" content="Website Horizontal Scrolling with jQuery" />
<meta name="keywords" content="jquery, horizontal, scrolling, scroll, smooth"/>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
</head>
<style>
a{
color:#fff;
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
span.reference{
position:fixed;
left:10px;
bottom:10px;
font-size:13px;
font-weight:bold;
}
span.reference a{
color:#fff;
text-shadow:1px 1px 1px #000;
padding-right:20px;
}
span.reference a:hover{
color:#ddd;
text-decoration:none;
}

</style>
<body>
<div>
<span class="reference">
<a href="http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/">© Codrops</a>
<a href="index_vertical.html">Vertical Demo</a>
</span>
</div>

<div class="section black" id="section1">
<h2>Section 1</h2>
<p>
MY Spectre around me night and day
Like a wild beast guards my way;
My Emanation far within
Weeps incessantly for my sin.
</p>
<ul class="nav">
<li>1</li>
<li><a href="#section2">2</a></li>
<li><a href="#section3">3</a></li>
</ul>
</div>
<div class="section white" id="section2">
<h2>Section 2</h2>
<p>
‘A fathomless and boundless deep,
There we wander, there we weep;
On the hungry craving wind
My Spectre follows thee behind.

</p>
<ul class="nav">
<li><a href="#section1">1</a></li>
<li>2</li>
<li><a href="#section3">3</a></li>
</ul>
</div>
<div class="section black" id="section3">
<h2>Section 3</h2>
<p>
‘He scents thy footsteps in the snow
Wheresoever thou dost go,
Thro’ the wintry hail and rain.
When wilt thou return again?

</p>
<ul class="nav">
<li><a href="#section1">1</a></li>
<li><a href="#section2">2</a></li>
<li>3</li>
</ul>
</div>

<!-- The JavaScript -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.easing.1.3.js"></script>
<script type="text/javascript">
$(function() {
$('ul.nav a').bind('click',function(event){
var $anchor = $(this);
/*
if you want to use one of the easing effects:
$('html, body').stop().animate({
scrollLeft: $($anchor.attr('href')).offset().left
}, 1500,'easeInOutExpo');
*/
$('html, body').stop().animate({
scrollLeft: $($anchor.attr('href')).offset().left
}, 1000);
event.preventDefault();
});
});
</script>
</body>
</html>
El codigo que va hacia abajo
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Website Vertical Scrolling with jQuery</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="description" content="Website Vertical Scrolling with jQuery" />
<meta name="keywords" content="jquery, vertical, scrolling, scroll, smooth"/>
<link rel="stylesheet" href="css/style_vertical.css" type="text/css" media="screen"/>
</head>
<style>
a{
color:#fff;
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
span.reference{
position:fixed;
left:10px;
bottom:10px;
font-size:13px;
font-weight:bold;
}
span.reference a{
color:#fff;
text-shadow:1px 1px 1px #000;
padding-right:20px;
}
span.reference a:hover{
color:#ddd;
text-decoration:none;
}

</style>
<body>
<div>
<span class="reference">
<a href="http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/">© Codrops</a>
<a href="index.html">Horizontal Demo</a>
</span>
</div>

<div class="section black" id="section1">
<h2>Section 1</h2>
<p>
MY Spectre around me night and day
Like a wild beast guards my way;
My Emanation far within
Weeps incessantly for my sin.
</p>
<ul class="nav">
<li>1</li>
<li><a href="#section2">2</a></li>
<li><a href="#section3">3</a></li>
</ul>
</div>
<div class="section white" id="section2">
<h2>Section 2</h2>
<p>
‘A fathomless and boundless deep,
There we wander, there we weep;
On the hungry craving wind
My Spectre follows thee behind.

</p>
<ul class="nav">
<li><a href="#section1">1</a></li>
<li>2</li>
<li><a href="#section3">3</a></li>
</ul>
</div>
<div class="section black" id="section3">
<h2>Section 3</h2>
<p>
‘He scents thy footsteps in the snow
Wheresoever thou dost go,
Thro’ the wintry hail and rain.
When wilt thou return again?

</p>
<ul class="nav">
<li><a href="#section1">1</a></li>
<li><a href="#section2">2</a></li>
<li>3</li>
</ul>
</div>

<!-- The JavaScript -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.easing.1.3.js"></script>
<script type="text/javascript">
$(function() {
$('ul.nav a').bind('click',function(event){
var $anchor = $(this);

$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500,'easeInOutExpo');
/*
if you don't want to use the easing effects:
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1000);
*/
event.preventDefault();
});
});
</script>
</body>
</html>

Última edición por ryu100ar; 21/01/2012 a las 19:51

Etiquetas: diseño-paginas-web, innovadores, jquery, scroll
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 08:04.