[英]Adding style to border to have shadow right or bottom
I know how to make shadow around for a table or an image. 我知道如何为桌子或图像制作阴影。 Is there a way to make shadow for border as well? 有没有办法为边境制作阴影? This is my table cell CSS. 这是我的表格单元格CSS。 Thank you! 谢谢!
.customerCell{
color: #000000;
background:#f4f2e6;
border-bottom: 1px solid #ffffff;
border-left: 1px solid #ffffff;
vertical-align: middle;
}
This is the example of the border I'm talking about. 这是我正在谈论的边界的例子。
If I understood you are you wanting this: Demo. 如果我明白你想要这个: 演示。
CSS: CSS:
.customerCell{
color: #000000;
background:#f4f2e6;
border-bottom: 1px solid #ffffff;
border-left: 1px solid #ffffff;
vertical-align: middle;
width: 150px;
height: 50px;
box-shadow: 3px 3px 2px 0px #eee;
}
Use the CSS3 box-shadow
property. 使用CSS3 box-shadow
属性。 It's parmeters are like this: 它的参数是这样的:
box-shadow: horizontal-offset vertical-offset blur spread color inset;
So in your case: 所以在你的情况下:
horizontal-offset
: 3px horizontal-offset
:3px
vertical-offset
: 3px vertical-offset
:3px
blur
: 2px blur
:2px
spread
: 0px spread
:0px
color
: #eee color
:#eee
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.