uniapp button按钮去掉默认样式

有时候要使用uniapp官方提供的客服和分享功能,需要用到button按钮,里面属性open-type正好可以实现这些功能,不得不使用这种方式。

但是这种方式,uniapp官方默认为button按钮加了些样式,自己写的样式也无法进行完全覆盖,所以今天分享一个覆盖官方button按钮的样式

bash 复制代码
button::after {
            border: none;
        }

        button {
            position: relative;
            display: block;
            margin-left: auto;
            margin-right: auto;
            padding-left: 0px;
            padding-right: 0px;
            box-sizing: border-box;
            text-align: center;
            text-decoration: none;
            line-height: 1.35;
            -webkit-tap-highlight-color: transparent;
            overflow: hidden;
            color: #000;
            font-size: 32rpx;
            background-color: #fff;
            width: 100%;
            height: 100%;
        }
相关推荐
H0482 分钟前
symbol为什么说是为了解决全局变量冲突的问题
javascript
HelloReader2 分钟前
从 Tauri 2.0 Beta 升级到 2.0 Release Candidate Capabilities 权限前缀与内置 Dev Server 网络策略变
前端
只与明月听33 分钟前
RAG深入学习之Chunk
前端·人工智能·python
一枚前端小姐姐1 小时前
低代码平台表单设计系统架构分析(实战一)
前端·低代码·架构
HelloReader1 小时前
Tauri 1.0 升级到 Tauri 2.0从“能跑”到“跑得稳”的迁移实战指南(含移动端准备、配置重构、插件化 API、权限系统)
前端
Always_Passion1 小时前
FE视角下的Referrer全面解析
javascript·面试
JunjunZ1 小时前
uniapp 文件预览:从文件流到多格式预览的完整实现
前端·uni-app
_Eleven1 小时前
React 19 深度解析:Actions 与 use API 源码揭秘
前端
七牛云行业应用1 小时前
大模型接入踩坑录:被 Unexpected end of JSON 折磨三天,我重写了SSE流解析
javascript·人工智能·代码规范
_AaronWong2 小时前
Vue3+Element Plus 通用表格组件封装与使用实践
前端·javascript·vue.js