
button样式如下
button {
border: none;
width: 200rpx;
padding: 0;
margin: 0;
}
.paybutton {
display: flex;
flex-direction: row;
color: white;
font-size: 32rpx;
margin-right: 40rpx;
width: 200rpx;
max-width: 200rpx;
height: 60rpx;
border-radius: 30rpx;
line-height: 60rpx;
align-items: center;
justify-content: center;
}
发现还是有边框
解决方法:
添加样式
button::after {
border: none;
}

加上背景颜色看一下

修复按钮边框问题与样式优化
这篇博客探讨了一个关于CSS样式的问题,即在设置button样式为无边框后仍然显示边框的情况。作者通过分析样式代码,发现在特定元素的伪类选择器`:after`中添加`border:none;`可以解决这个问题。此外,还展示了`.paybutton`类的详细样式定义,用于创建具有特定尺寸、圆角、对齐方式和背景颜色的按钮。博客内容着重于前端开发中的CSS细节和问题排查技巧。
9552

被折叠的 条评论
为什么被折叠?



