禁用内联 css 样式 [英] Disable inline css style

查看:34
本文介绍了禁用内联 css 样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 IE Developer 工具检查 html 时,我看到按钮有一个内联样式:

When I inspect the html with IE Developer tools, I see that there is one inline style for a button:

我不想要这个输入元素的任何 width 属性.如何使用空 width 禁用或覆盖它?

I don't want any width property for this input element. How can I disable or overwrite this with empty width?

推荐答案

如果要覆盖内联样式,则需要使用 !important

If you want to override inline styles then you need to add styles in your stylesheet with !important

例如

width: auto !important;

参考 - CSS 特异性

这篇关于禁用内联 css 样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆