我使用了一个javascript库,它将自己放置在整个网络浏览器上,脚本似乎覆盖了鼠标轮事件,因此它禁止滚动。为了解决滚动问题,我在上面添加了一个div,在上面加上了一个层,如果你把鼠标放在div滚动上是可能的。
代码:
<div style="position:fixed; top:0; left:0; z-index:3;"><div style="height:10000px; width:180px; background-color:#ccc;"></div></div>现在,我想知道如何在浏览器的右侧放置一个类似的div,无论浏览器大小如何,它都应该放在屏幕的右侧。
如何用图层来做这件事?
发布于 2015-06-11 21:09:53
只需添加一些CSS,告诉它位于屏幕的右侧(left不是唯一的位置选项):
#my-div-on-the-right {
position: fixed;
right: 0;
/* whatever other styles (width, height, top, bottom, etc.) */
}https://stackoverflow.com/questions/30791466
复制相似问题