CSS阴影3侧 [英] CSS shadows on 3 sides

查看:104
本文介绍了CSS阴影3侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在看所有的CSS阴影教程,这是伟大的。不幸的是,我需要在块元素的三边(左,底,右)上放一个阴影。所有的教程都讨论了向上和向左移动你的块元素。

I'm looking at all the CSS Drop shadow tutorials, which are great. Unfortunately, I need to put a shadow on three sides of a block element (left, bottom, right). All the tutorials talk about shifting your block element up and to the left. Anyone have insights into putting a shadow on three or even four sides?

推荐答案

感谢大家。我最后这样做的方式是这样:

Thanks everyone. The way I ended up doing it was sorta like this:

<div id="top_margin"></div>
<div id="left_right_shadow">this div has a 5 px tall repeating background that is a bit bigger than the width of my content block, shadow on the left, white space, shadow on the right
  <div id="content">Content as normal</div>
</div>
<div id="bottom_margin">This has the bottom shadow</div>

这篇关于CSS阴影3侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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