mirror of
https://github.com/arnaucube/ivardiaweb.git
synced 2026-02-08 04:16:39 +01:00
imatges dinamiques a mitges
This commit is contained in:
@@ -22,7 +22,8 @@
|
|||||||
</head>
|
</head>
|
||||||
<body onload='OnLoadIndex();'>
|
<body onload='OnLoadIndex();'>
|
||||||
<div class='own-container'>
|
<div class='own-container'>
|
||||||
<img id='backgroundImage' class='own-indexBackgroundImage' src='imatges/mainBackground.jpg' />
|
<img id='backgroundImage0' class='own-indexBackgroundImage' src='imatges/mainBackground.jpg' />
|
||||||
|
<img id='backgroundImage1' class='own-indexBackgroundImage opacity0' src='imatges/background/background0.jpg' />
|
||||||
<div class='own-lang own-whiteText'>
|
<div class='own-lang own-whiteText'>
|
||||||
<a href="#">CAT</a>
|
<a href="#">CAT</a>
|
||||||
<a href='#'>CAST</a>
|
<a href='#'>CAST</a>
|
||||||
|
|||||||
12
index.js
12
index.js
@@ -16,8 +16,18 @@ function OnLoadDefault(){
|
|||||||
function OnLoadIndex(){
|
function OnLoadIndex(){
|
||||||
OnLoadDefault();
|
OnLoadDefault();
|
||||||
var numImg=0;
|
var numImg=0;
|
||||||
|
var visibleImg=0;
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
document.getElementById("backgroundImage").src="imatges/background/background"+numImg+".jpg";
|
|
||||||
|
document.getElementById("backgroundImage"+visibleImg).className="own-indexBackgroundImage";
|
||||||
|
if(visibleImg==0){
|
||||||
|
visibleImg=1;
|
||||||
|
}else{
|
||||||
|
visibleImg=0;
|
||||||
|
}
|
||||||
|
document.getElementById("backgroundImage"+visibleImg).className+=" own-opacity0";
|
||||||
|
document.getElementById("backgroundImage"+visibleImg).src="imatges/background/background"+numImg+".jpg";
|
||||||
|
|
||||||
numImg++;
|
numImg++;
|
||||||
if(numImg>9)
|
if(numImg>9)
|
||||||
{
|
{
|
||||||
|
|||||||
11
own.css
11
own.css
@@ -36,6 +36,10 @@ a:active {
|
|||||||
left: 0px;
|
left: 0px;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
|
|
||||||
|
-webkit-transition: opacity 1s ease-in-out;
|
||||||
|
-moz-transition: opacity 1s ease-in-out;
|
||||||
|
-o-transition: opacity 1s ease-in-out;
|
||||||
|
transition: opacity 1s ease-in-out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,8 +52,15 @@ a:active {
|
|||||||
left: 0px;
|
left: 0px;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
|
|
||||||
|
-webkit-transition: opacity 1s ease-in-out;
|
||||||
|
-moz-transition: opacity 1s ease-in-out;
|
||||||
|
-o-transition: opacity 1s ease-in-out;
|
||||||
|
transition: opacity 1s ease-in-out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.own-opactity0{
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
.own-langIndex{
|
.own-langIndex{
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-right: 50px;
|
margin-right: 50px;
|
||||||
|
|||||||
Reference in New Issue
Block a user