在div容器上放置阴影? [英] Drop shadow on a div container?

查看:115
本文介绍了在div容器上放置阴影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有自动提示的搜索框,在其下方显示多个搜索字符串建议(例如google)。是否有可能在CSS的自动建议框有阴影,或者我需要一个类型的脚本?我尝试了一个背景图片,但建议的数量可以从1到10或15之间变化。



我更喜欢某些在IE6 +和FF2 +如果可能的工作。谢谢!

解决方案

这适用于我所有的浏览器:

  .shadow {
-moz-box-shadow:0 0 30px 5px#999;
-webkit-box-shadow:0 0 30px 5px#999;
}

然后只需给任何div阴影类,不需要jQuery。 >

I have a searchbox with auto-suggest that pops a div up underneath it with multiple search string suggestions (like google). Is it possible to have drop shadow on the auto-suggest box with CSS or will I need a script of some sort? I tried a background image but the number of suggests can vary from 1 to 10 or 15.

I'd prefer something that works in IE6+ and FF2+ if possible. Thanks!

解决方案

This works for me on all my browsers:

.shadow {
-moz-box-shadow: 0 0 30px 5px #999;
-webkit-box-shadow: 0 0 30px 5px #999;
}

then just give any div the shadow class, no jQuery required.

这篇关于在div容器上放置阴影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆