【发布时间】:2014-02-15 15:56:58
【问题描述】:
我为 wordpress 开发了一个插件,里面有很多内容(表单列表等)。
我知道这个问题被问了好几次,但在 wordpress 内容中没有。
TwentyThirteen 的默认主题为所有按钮添加了一些丑陋的样式:
button,
input[type="submit"],
input[type="button"],
input[type="reset"]{
background: #e05d22;
background: linear-gradient(to bottom, #e05d22 0%, #d94412 100%);
border-bottom: 3px solid #b93207;
border-radius: 2px;
padding: 11px 24px 10px;
}
以及:focus、:active、:hover 的更多不同定义。
如果您的页面过时且带有自定义按钮外观,这不是一个大问题...
但在我的情况下,我依赖使用 jquery 和 twitter-bootstrap 并且样式完全混乱(悬停时的红色边框,随机填充等等)。
并覆盖 DatePicker 上关闭按钮的样式,例如只是让它看起来很正常......并不好玩。
这对我来说似乎是一个普遍问题,但我是 wordpress 主题和插件的新手...
那么清除/规范化这种特定样式的好解决方案是什么?
(只需重置 CSS 将删除大部分默认外观)
【问题讨论】: