HTML/CSS : 创建一个顶部细底部厚的侧边框(尽量避免使用边框图像)

HTML/CSS : Create a side border that is thin at top and thick at bottom (trying to avoid using border images)

我想创建一个右边框在顶部几乎为 0px 但在底部逐渐增加到 5px 的侧面板。

我尽量避免使用边框图像,因为我想使用最少的外部资源,例如图像。

我该怎么做。 我试图为此搜索很多但找不到。因此,如果有人可以向我指出类似的问题,那也是有帮助的。

下面是link: http://s15.postimg.org/ftodd5qx3/SNAPSHOT.png?noCache=1435470821

如果您注意到,左侧是一个 div,在右侧(图像左侧)的左侧面板上带有米色边框,长度可变。

您可以在容器上使用伪后元素 div,然后在该后元素上使用边框来创建三角形。

.box::after{
    border-right: 300px solid transparent;
    border-left: 5px solid transparent;
    border-bottom: 300px solid #666666;
}

参见此处示例https://jsfiddle.net/vkkze6v0/