运行下面的代码时发现使用CSS投影效果能影响整体的大小,以至于DIV中包含的input中鼠标位置也偏移了,请问哪位高手能帮忙看下?<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DIVͶӰcss3IE˾</title>
<style type="text/css">
.con2{
width:200px;
-moz-box-shadow:0 0 10px #000;
-webkit-box-shadow:0 0 10px #000;
box-shadow:0 0 10px #000;
/*positionֹIE6<a>ʱ߿ƫ,ҺòΪ˶λ˾<a>ܵ*/
position:relative;
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=90, Color='#999999') progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=270, Color='#999999');/*ɫҪд6λд#666*/
}
a{ display:block; height:150px;}
</style>
</head>
<body><div class="con2">
<input type="text" />
</div></body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DIVͶӰcss3IE˾</title>
<style type="text/css">
.con2{
width:200px;
-moz-box-shadow:0 0 10px #000;
-webkit-box-shadow:0 0 10px #000;
box-shadow:0 0 10px #000;
/*positionֹIE6<a>ʱ߿ƫ,ҺòΪ˶λ˾<a>ܵ*/
position:relative;
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=90, Color='#999999') progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=270, Color='#999999');/*ɫҪд6λд#666*/
}
a{ display:block; height:150px;}
</style>
</head>
<body><div class="con2">
<input type="text" />
</div></body>
</html>
解决方案 »
- js解析XML的问题,请各位帮帮忙,谢谢!
- Jquery touchwipe结合Jquery cycle怎么实现图片翻滚的效果
- 关于innerHTML的问题,新学
- 高深问题。能否实现一次请求,多次回调功能。
- js的 exec和 execCommand 有什么区别?
- 这个年代流行不结贴
- 之前一个腾讯同事写的js 加密...还有另外一段...求解eval...最好说下原理
- 长角了,没啥拿的出手的,这是以前写的一个HTML代码过滤函数,用在在线编辑器里,没啥难的就是写起来费事
- 我在某B/S系统中有两个页面A、B,A打开B,请问B关闭时如何自动刷新A?
- 级联菜单怎么做啊。
- 菜鸟求教:extjs4 如何为treepanel动态添加节点 [JavaScript]
- 轮换图片点击到锚点的标题,修改JS代码,如下,谢谢指导。急等!
<div class="con2">
<input/>
</div>
<div class="con2_shadow"></div>
把con2_shadow设置的跟con2一样的宽高,绝对定位,然后对con2_shadow应用滤镜
既然你的con2都用了relative了,就很容易能使用z-index排列了
这个con2_shadow可以用ie的hack隐藏,也可以在服务器上面判断浏览器版本之后再添加.用js也行,用js还能动态的取到con2的宽和高,感觉应该比较好