- friendship connection
自由淘
午梅
万德尼科
爱特流体控制有限公司
ccie real lab
大连鲁班软件有限公司
富地机械制造有限公司
尚和会馆
css给容器和图片添加阴影效果
这是一个没有用图片做的阴影效果,它可以应用于任何容器元素,可以通过css设置成任何阴影颜色和阴影位置。
如果是图像,应该给shadowcontainer一个明确的宽度和高度来适合图片。
Some text here. Some text here.
Some text here. Some text here.
Some text here. Some text here.
Some text here. Some text here.

css代码
<style type="text/css">
<!--
.shiftcontainer2{
position: relative;
left: 5px; /*Number should match -left shadow depth below*/
top: 5px; /*Number should match -top shadow depth below*/
}
.shadowcontainer2{
width: 265px; /* container width*/
background-color: #d1cfd0;
}
.shadowcontainer2 .innerdiv2{
/* Add container height here if desired */
background-color: white;
border: 1px solid gray;
padding: 6px;
position: relative;
left: -5px; /*shadow depth*/
top: -5px; /*shadow depth*/
}
-->
</style>
xhtml
<div class="shiftcontainer2">
<div class="shadowcontainer2">
<div class="innerdiv2" >
Some title<br />
Some text here. Some text here.<br />
Some text here. Some text here.<br />
Some text here. Some text here.<br />
Some text here. Some text here.
</div>
</div>
</div>
您可能会对以下文章感兴趣:
精通CSS-来自Clagnut的阴影方法
精通CSS-洋葱皮阴影
精通CSS-简单的CSS阴影
精通CSS-模糊阴影
精通CSS-山顶角
上一篇:关于if条件注释 <!--[if IE]> <!--[if !IE]>
下一篇:一个tableless的CSS表单设计

您好!你介意我分享您的博客,与我的MySpace组吗?有一个伙计,我认为会真的很喜欢你的内容很多。请让我知道。谢谢
嘿只是想给你一个快速的抬起头来。在您的文章的话似乎是运行在IE浏览器的屏幕。我不知道如果这是一个格式的问题或事做浏览器的兼容性,但我想我会后,让你知道。虽然设计和风格很好看!希望你能尽快解决的问题。荣誉
你介意我引用了您的文章数,只要为我提供信贷和来源回你的网站?我的博客网站是在你和我的游客将真正从中受益很多您在这里所提供的信息相同的确切利基。请让我知道如果这与你没事吧。多谢了!