gpt4 book ai didi

html - 给顶部边框两种颜色

转载 作者:搜寻专家 更新时间:2023-10-31 22:08:29 24 4
gpt4 key购买 nike

我有这个:

<style type="text/css">
.TopBorderPanel {
position: relative;
overflow: hidden;
border-top: 2px solid #bbbb9f;
margin: 1px;
width: 500px;
}
</style>

顶部边框只有一种颜色,#bbbb9f,
我想做的是让它有两种颜色
50% #bbbb9f 和 50% #cccccc
可能吗?

最佳答案

http://jsfiddle.net/CdWCA/

.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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com