css实现层的隐现问题!关于背景色变半透明

来源:百度知道 编辑:UC知道 时间:2024/06/11 09:49:13
这是我做的一个关于登录框的层,想要实现背景半透明的效果,但是由于内容太多,拖动滚动条的时候,滚动条下方就没有半透明的效果了。应该怎么改才可以让拖动滚动条北京半透明也不消失呢?
还有就是这个登录框的层怎么实现可以自由拖动?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>个人主页</title>
<style>
body { height:100%; width:100%;}
.white_content {display: none; position: absolute; top: 25%;left: 25%; width: 50%; padding: 6px 16px;border: 12px solid #D6E9F1;
background-color: white;z-index:1002;overflow: auto;}
.black_ove

这个背景要用js来写,因为如果用css,会存在浏览器兼容性的问题,和浏览器放大与缩小的问题。

拖动的话,这方面的代码就太多了。

上blueidea.com上问,在这儿问没有人会答的。