div里面的阴影

Tim*_*ütz 11 css shadow css3

是否可以在不使用图片的情况下在div框内显示阴影?相反,我想使用css命令.

那么有一些命令如下:-webkit-box-shadow: 1px inset;

san*_*eep 24

是的,有一个命令inset.像这样:

-webkit-box-shadow: 0 0 1px 3px #000 inset;
-moz-box-shadow: 0 0 1px 3px #000 inset;
box-shadow: 0 0 1px 3px #000 inset;
Run Code Online (Sandbox Code Playgroud)

你可以从这里生成http://css3generator.com/


oez*_*ezi 17

在CSS3中,theres box-shadow也可以插入来完成你所需要的.以下浏览器支持此功能:

  • chrome> = 10.0(> = 4.0 with -webkit-prefix)
  • firefox> = 4.0(> = 3.5 with -moz-prefix)
  • IE> = 9.0
  • opera> = 10.5
  • safari> = 5.1(> = 5.0 with -webkit-prefix)