div总是被select遮挡的解决方法
方法 解决 SELECT div 总是 遮挡
2023-06-13 09:14:01 时间
<html>
<head>
<meta http-equiv="Content-Type" c>
<title>div被select遮挡的解决方法——脚本之家</title>
</head>
<body>
<iframe style="position:absolute;z-index:9;width:expression
(this.nextSibling.offsetWidth);height:expression
(this.nextSibling.offsetHeight);top:expression(this.nextSibling.offsetTop);left:expression
(this.nextSibling.offsetLeft);" frameborder="0" ></iframe>
<form id="Form1" method="post">
<div style="z-index:10;position:absolute;background-
color:blue;width:100;height:18;overflow:hidden;" >aaaaaaa<br/>bbbbbbb<br/>ccccccc</div>
<select style="width:200" ><option>test0<option>test1<option>test2<option>test3</select>
<br/>
<pre>
Div被Select挡住,是一个比较常见的问题。
有的朋友通过把div的内容放入iframe或object里来解决。
可惜这样会破坏页面的结构,互动性不大好。
这里采用的方法是:
虽说div直接盖不住select
但是div可以盖iframe,而iframe可以盖select,
所以,把一个iframe来当作div的底,
这个div就可以盖住select了.
</pre>
</form>
</body>
</html>
<head>
<meta http-equiv="Content-Type" c>
<title>div被select遮挡的解决方法——脚本之家</title>
</head>
<body>
<iframe style="position:absolute;z-index:9;width:expression
(this.nextSibling.offsetWidth);height:expression
(this.nextSibling.offsetHeight);top:expression(this.nextSibling.offsetTop);left:expression
(this.nextSibling.offsetLeft);" frameborder="0" ></iframe>
<form id="Form1" method="post">
<div style="z-index:10;position:absolute;background-
color:blue;width:100;height:18;overflow:hidden;" >aaaaaaa<br/>bbbbbbb<br/>ccccccc</div>
<select style="width:200" ><option>test0<option>test1<option>test2<option>test3</select>
<br/>
<pre>
Div被Select挡住,是一个比较常见的问题。
有的朋友通过把div的内容放入iframe或object里来解决。
可惜这样会破坏页面的结构,互动性不大好。
这里采用的方法是:
虽说div直接盖不住select
但是div可以盖iframe,而iframe可以盖select,
所以,把一个iframe来当作div的底,
这个div就可以盖住select了.
</pre>
</form>
</body>
</html>
相关文章
- [77]pymongo连接认证 auth failed解决方法
- 解决方法+jade6.5版本安装包下载免费分享+使用教程
- weblogic服务建立数据源连接测试更新mysql驱动包的问题及解决方法
- Linux查看进程运行的完整路径方法详解程序员
- oracle select in超过1000条报错解决方法详解数据库
- Linux下定时任务脚本实现方法(linux定时任务脚本)
- MySQL中的二进制数据存储方法(mysql二进制数据)
- MySQL索引过长的解决方法:缩短索引长度,使用前缀索引或哈希索引。(mysql索引太长)
- T-SQL篇如何防止SQL注入的解决方法
- Java应用在Linux上乱码的原因及解决方法(java linux乱码)
- MySQL双主键模式提高数据库性能的好方法(mysql中双主键模式)
- MySQL导出Excel文件(xlsx)时遇到错误的解决方法(mysql xlsx出错)
- 解决方法调整MySQL的字符集和字段属性设置(mysql不显示字段宽度)
- ADODB连接access是出现80004005错误的解决方法
- jQuery选中select控件无法设置selected的解决方法
- php变量未定义等错误的解决方法
- 安装MySQL5后无法启动(不能Startservice)解决方法小结
- php中$_GET与$_POST过滤sql注入的方法