gpt4 book ai didi

css - 如何仅创建此按钮形状 CSS?

转载 作者:太空宇宙 更新时间:2023-11-04 02:00:56 25 4
gpt4 key购买 nike

我很难回答如何使用 CSS 制作此按钮。最简单的方法是在右侧部分使用带有背景图像的 :after,但在悬停效果方面,这并不干净利落。

我已经能够只用右边的蓝色箭头自己解决它,但是这个“双箭头”让我抓狂。

enter image description here

最佳答案

可能是背景渐变?

button {
margin:1em;
border:none;
padding:0.25em 3em 0.25em 1em;
text-align:left;
background:
linear-gradient(-120deg, transparent 1em, #0099C3 1.05em , #0099C3 1.5em, transparent 1.45em, transparent 2em, #0099C3 2.05em) top no-repeat,
linear-gradient(300deg, transparent 1em, #0099C3 1.05em , #0099C3 1.5em, transparent 1.45em, transparent 2em, #0099C3 2.05em) bottom no-repeat ;
background-size: 100% 50%;
color:white
}
<button>button button <br/> button</button>

关于css - 如何仅创建此按钮形状 CSS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41774212/

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