gpt4 book ai didi

css - 边框左渐变

转载 作者:行者123 更新时间:2023-11-28 09:27:13 24 4
gpt4 key购买 nike

这是我的CSS:

width: 0;
height: 0;
border-top: 31px solid transparent;
border-bottom: 31px solid transparent;
border-left: 31px solid #0caa3f;

是否可以让border-left有渐变?

最佳答案

演示:http://jsfiddle.net/abhitalks/fg7Ex/3/

#grad {
width: 60px;
height: 60px;
position: absolute;
top: 32px;
left: 32px;
clip: rect(auto 30px 60px auto);
}

#grad:after {
content: '';
position: absolute;
background-color: rgba(0, 0, 0, .7);
top: 8px;
bottom: 8px;
left: 8px;
right: 8px;
-webkit-transform: rotate(-45deg);
background-image: -webkit-gradient(linear, right bottom, left bottom, color-stop(.75, #52882d), color-stop(0, #eee));
border: 1px solid #fff;
}
<div id="grad"></div>

无耻地从这里捡起:https://gist.github.com/distilledhype/582201

关于css - 边框左渐变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21155885/

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