我有这个:
<style type="text/css">
.TopBorderPanel {
position: relative;
overflow: hidden;
border-top: 2px solid #bbbb9f;
margin: 1px;
width: 500px;
}
</style>
顶部边框只有一种颜色,#bbbb9f,
我想做的是让它有两种颜色
50% #bbbb9f 和 50% #cccccc
可能吗?
最佳答案
.TopBorderPanel {
border-top: 2px solid #bbbb9f;
position: relative;
}
.TopBorderPanel:after {
position: absolute;
left: 50%;
right: 0;
top: -2px;
border-top: 2px solid #cccccc;
content: '';
}
关于html - 给顶部边框两种颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11900269/