如何在所有四边应用box-shadow? [英] How to apply box-shadow on all four sides?

查看:106
本文介绍了如何在所有四边应用box-shadow?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在所有四面都应用 box-shadow 。我只能从两方面得到它:

I'm trying to apply a box-shadow on all four sides. I could only get it on 2 sides:

推荐答案

这是因为x和y偏移。试试这个:

It's because of x and y offset. Try this:

-webkit-box-shadow: 0 0 10px #fff;
        box-shadow: 0 0 10px #fff;

编辑(年后...):更多的跨浏览器, )

edit (year later..): Made the answer more cross-browser, as requested in comments :)

btw:现在有许多css3生成器。
css3.me css3maker css3generator etc ...

btw: there are many css3 generator nowadays.. css3.me, css3maker, css3generator etc...

这篇关于如何在所有四边应用box-shadow?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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