d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Webkit Transition Help Please
Add Reply New Topic New Poll
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Dec 6 2012 05:42pm
My problem is live at:
http://www.geekygents.com/problem/

Basically the youtube video won't hide and re-appear if I'm using the display:none and then display:inline, it just stays there always, changing opacity doesn't help as it un-hides itself.
My code is really a mess but anyone that would look through it and fix it for me I'd muchly appreciate it.

The correct way this would work is, click the video camera, click the green/red gradient, and then the youtube video will replace the green/red gradient.

Thanks!

Off-site source:
html
Code

<!doctype html>
<head>
<title>Alex Edwards</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<a href="index.html#home"><img src="images/awp.png" id="headimg" alt="Alex's Webpage"/></a>
<a href="#home"><div id="home">
<img src="images/spt.png" id="sptimg" alt="Select a Project Type"/>
<div id="list">
<a href="#home"><img src="images/home.png" alt="Home"></a>
<a href="#1"><img src="images/video.png" width="145" alt="Videos"></a>
<a href="#2"><img src="images/picture.png" width="145" alt="Pictures"></a>
<a href="#3"><img src="images/flash.png" width="145" alt="Flash"></a>
<br/>
<div id="sublist">
<p id="1"><a href="#example" id="links"><a id="example" href="#youtube"><img src="images/links/example.png"/></a></a>
<iframe id="youtube" width="460" height="315" src="http://www.youtube.com/embed/rYXdsOEWBj0" frameborder="0" allowfullscreen></iframe>
</p>
<p id="2">Pictures</p>
<p id="3">Flash</p>
</div>
</div>
</div>
</div></a>
</body>
</html>


css
Code
body{
width:100%;
height:100%;
margin-top:80px;
background:url('images/bg.jpg');
}
#headimg{
padding-left:14em;
}
a{
border:0;
}
#home{
width:70%;
border:1px solid #000;
-moz-border-radius:7px 7px;
border-radius:7px 7px;
padding:25px;
margin:0 auto;
margin-top:20px;
background:url('images/bg2.jpg');
height:375px;
transition:all 1s ease;
-webkit-transition:all 1s ease;
}
#home:target{
height:240px;
}
#list{
margin-top:20px;
}
#list a{
margin:20px;
}
#list a img{
-moz-border-radius:7px 7px;
border-radius:7px 7px;
display:inline;
}
#sublist{
margin-left:170px;
}
p{
color:rgba(0,0,0,0.0);
transition:color 1s ease;
-webkit-transition:all 1s ease;
-moz-transition:all 1s ease;
-o-transition:all 1s ease;
-ms-transition:all 1s ease;
position:absolute;
height:20px;
opacity:0;
}
p:target{
display:inline;
position:absolute;
color:rgba(0,0,0,0.9);
height:60px;
opacity:100;
}
#links{
color:#000;
text-decoration:none;
border:0;
z-index:0;
color:rgba(0,0,0,0.0);
position:absolute;
}
#links:target{
color:rgba(0,0,0,0.9);
position:absolute;
}
Member
Posts: 20,464
Joined: Dec 31 2006
Gold: 131.00
Dec 6 2012 05:58pm
not sure you can do this only with css, i would just use a couple of lines of javascript to add and remove a class, animate the base state etc.
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Dec 6 2012 06:01pm
Quote (WhyteLinux @ Dec 6 2012 06:58pm)
not sure you can do this only with css, i would just use a couple of lines of javascript to add and remove a class, animate the base state etc.


Hopefully I can, this is an assignment for a class and I'm only allowed html/css.
The transitions aren't required but it makes it much more pleasant.
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Dec 7 2012 05:22pm
What I did:

Simple just moved the items off screen until "targeted" , then had them move on, and had a delay on fading in (so a fly in from right wouldn't be known)
Don't recommend this though, since the width of the website is increased (anyone with eyes will see the bar down below grow)
Still talked with the teacher and she was fine with this, also made things have opacity of 0 in case someone would would scroll over to inspect, and it's still glitchy with youtube videos, parts of the youtube video will become visible on mouse-over.
Member
Posts: 3,700
Joined: Mar 12 2009
Gold: 12,345.00
Dec 7 2012 06:03pm
the div that you need to work with is .player-container
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll