css - 如何删除:活动状态下的多余边框?顺风
问题描述
我目前在使用 tailwindcss 时遇到了一个奇怪的问题。下面的按钮看起来不错。
但是当我点击它时,它会形成药丸/圆形,而不是下面的矩形。
有人知道如何使活动状态形状与当前形状相同吗?
这是我的按钮代码:
<button class="flex items-center justify-center focus:outline-none rounded-3xl
bg-green-200 text-gray-800 text-13 h-8 px-3">
Goto Button
</button>
我试图添加下面的代码。但不起作用
active:rounded-3xl
测试设备:iPhone X(使用 chrome 浏览器 (CTRL+SHFT+M))
解决方案
两种可能的解决方案
1)这可以通过禁用顺风预检来解决,但不幸的是,它可能会导致可能受影响的页面出现重大设计问题。
corePlugins: {
preflight: false,
}
2)或者,这可以通过更改光标样式来解决。将此类添加到按钮cursor-auto
。
<button class="cursor-auto flex items-center justify-center focus:outline-none rounded-3xl
bg-green-200 text-gray-800 text-13 h-8 px-3">
Goto Button
</button>
推荐阅读
- java - 如何修复 ScriptRunner 中的错误请求 - jira
- openssl - 如何从源代码安装中使用 openssl 1.0.2k 安装 Erlang 18
- facebook-graph-api - 如何通过 message_tags 过滤页面的帖子(API Graph Facebook v3.3)
- angular - 动态路由在 URL Angular 6 中显示搜索到的文本
- jquery - 如何让 jQuery 以数字方式检查数值?
- javascript - Apache Cordova Native Storage 从回调返回到外部函数
- vba - 执行代码时如何防止弹出框出现?
- cytoscape.js - 隐藏所有连接边时隐藏节点
- java - 使用 JOOQ 将小数秒保存到数据库中的 TIME 数据类型
- flutter - Flutter APK 发布构建无法上传到 Fabric Beta