【发布时间】:2013-08-10 03:36:44
【问题描述】:
您好,我正在尝试创建一个固定的 100% 宽度/高度 youtube 嵌入,以便当您将鼠标悬停在屏幕底部下方时会出现一个 div。现在这适用于 Chrome、Firefox、Opera12、Opera15,但不适用于 IE10。请参阅下面的 JSFiddle 以了解我的意思。
下面是我的css
*{
padding:0px;
margin:0px;
}
body{
width:100%;
height:100%;
}
html{
width:100%;
height:100%;
}
iframe{
position:fixed;
top:0px;
left:0px;
z-index:0;
height:100%;
width:100%;
}
#bannercontainer{
position:fixed;
z-index:1;
bottom:0px;
left:0px;
height:150px;
width:100%;
background:transparent;
}
#banner{
width:70%;
background-color:pink;
height:150px;
display:none;
margin:auto;
}
#bannercontainer:hover #banner{
display:block;
}
【问题讨论】:
-
我现在已经通过使用 background:rgba(0,0,0,0);而不是背景:透明;
标签: iframe youtube css-position internet-explorer-10 fixed