Html 如何仅使用 CSS 为整个表格添加阴影?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3806035/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 04:40:57  来源:igfitidea点击:

How do I add a shadow to an entire table using just CSS?

htmlcss

提问by marcamillion

I would like to add a subtle shadow to make my table look raised.

我想添加一个微妙的阴影,使我的桌子看起来升高。

Just using CSS, how do I do that?

只使用 CSS,我该怎么做?

回答by Peter Kruithof

table { box-shadow: 1px 1px 1px #999; }

table { box-shadow: 1px 1px 1px #999; }

More box-shadow examples here: http://www.css3.info/preview/box-shadow/

更多 box-shadow 示例:http: //www.css3.info/preview/box-shadow/

回答by skazhy

CSS3 has the box-shadow declaration. Check this articlefor more information.

CSS3 有 box-shadow 声明。查看这篇文章了解更多信息。