【发布时间】:2015-10-05 06:36:48
【问题描述】:
到目前为止,我只设法在整个框周围绘制阴影,而在非活动选项卡周围没有凹槽:
HTML:
<div class="box">
<div class="tabs">
<span class="tab active">Bild</span>
<span class="tab">Text</span>
</div>
<div class="content"></div>
</div>
CSS:
.box {
width: 200px;
height: 250px;
box-shadow: 0 0 2.5px 2px rgba(0, 0, 0, 0.18);
margin: 16px;
}
.tabs {
height: 30px;
}
.tab {
display: inline-block;
width: calc(50% - 2px);
height: 30px;
text-align: center;
line-height: 30px;
}
.tab:not(.active) {
/* Should be removed in the final solution with correct shadows... */
background-color: rgba(0, 0, 0, 0.18);
}
该解决方案不需要照顾旧版浏览器 (
谢谢
【问题讨论】:
-
您是否正在尝试实现这样的目标 - jsfiddle.net/zahedkamal87/xypjj7uy/2
标签: html css tabs shadow dropshadow