我正在尝试学习一点关于 javascript 及其工作原理的知识。我可以设法散列一些基本命令,但我正在尝试将此线程布局转换为 javascript onmouseover 命令,以便在留言板上与跨浏览器兼容,其代码不允许 css 悬停属性在 IE 中工作,除非它们在“一个”标签。请记住,我无法更改网页,只能更改一小部分布局,因此我无法设置 doctype 以使该 css 在 IE 中工作。
这是我没有 js 的情况:http: //jsfiddle.net/KRArE/
#postbody p::first-letter {
letter-spacing:1px;
line-height:0.5;
font-size: 30px;
font-family:'Lovers Quarrel', cursive;
}
#ruwhole {
width: 420px;
height: 420px;
position: relative;
overflow: hidden;
}
#ruwhole:hover .postbox {
-webkit-transition: 1s all ease-in-out;
-moz-transition: 1s all ease-in-out;
-o-transition: 1s all ease-in-out;
transition: 1s all ease-in-out;
position: absolute;
top: 0px;
width: 400px;
height: 370px;
border:10px solid #eeeddb;
}
#ruwhole .postbox {
-webkit-transition: 1s all ease-in-out;
-moz-transition: 1s all ease-in-out;
-o-transition: 1s all ease-in-out;
transition: 1s all ease-in-out;
position:absolute;
width: 400px;
height:370px;
top: -390px;
border:10px solid #eeeddb;
}
#ruwhole:hover .statbar {
-webkit-transition: 1s all ease-in-out;
-moz-transition: 1s all ease-in-out;
-o-transition: 1s all ease-in-out;
transition: 1s all ease-in-out;
position: absolute;
bottom: 0px;
width: 100%;
height: 30px;
}
#ruwhole .statbar {
-webkit-transition: 1s all ease-in;
-moz-transition: 1s all ease-in;
-o-transition: 1s all ease-in;
transition: 1s all ease-in;
position: absolute;
bottom: -30px;
width: 100%;
height: 30px;
}
#postbody em {
color: #841b1f;
}
我可以更改应用鼠标悬停的 div 的质量,但是我将如何将 mouseover js 命令应用于一个 div 并使更改出现在其他 div 中?我希望用户能够将鼠标悬停在整个布局上,并让两个不在屏幕上的 div 滑入,就像使用 css 函数一样。我在这里完全不知所措!