自己做的按钮怎么放到html,html – 我如何使用:: after在我的按钮上制作箭头?

我可以在右侧创建一个带箭头的按钮,如下所示:

.next-button {

font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;

text-decoration: none;

color: #fff;

text-align: center;

border: none;

background-color: #2399e5;

display: inline-block;

height: 36px;

line-height: 36px;

padding: 0 1rem;

}

.next-point{

vertical-align: top;

width: 0;

height: 0;

display: inline-block;

border-top: 18px solid transparent;

border-bottom: 18px solid transparent;

border-left: 18px solid #2399e5;

border-right: 18px solid transparent;

}

Next

…但是如果我尝试使用::之后它就会失效.这是我尝试过的方式:

.next-button {

font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;

text-decoration: none;

color: #fff;

text-align: center;

border: none;

background-color: #2399e5;

display: inline-block;

height: 36px;

line-height: 36px;

padding: 0 1rem;

}

.next-button::after{

content: " ";

vertical-align: top;

width: 0;

height: 0;

display: inline-block;

border-top: 18px solid transparent;

border-bottom: 18px solid transparent;

border-left: 18px solid #2399e5;

border-right: 18px solid transparent;

}

Next

我已经摆弄了一段时间,显然我并不完全明白如何使用:: after.如何使用:: after而不是创建一个单独的div来完成我的第一个代码段中的按钮外观?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值