Uniform 是一个表单样式插件。我在我的新网站上使用它。这真的很好,而且工作完美,但我有一个网站搜索,我想在其中放置我自己的 css 样式。如何让这些字段不被制服样式化,以便它们可以被 CSS 样式化。???
请帮忙../
通过类似的东西解决了它
$(function(){
$("input, input:file, select, checkbox").uniform();
});
我遇到了这个问题并找到了更新的答案。
来自https://github.com/pixelmatrix/uniform
如果你想“不统一”一些东西,只需调用这个函数。它将删除内联样式、额外的 dom 元素和事件处理程序,有效地将元素恢复到之前的状态。
$.uniform.restore([elem/selector string]);
// e.g.
$.uniform.restore("#something");
将此添加到页面
<style>
input, select, button { // name the appropriate selectors
border: auto;
background: auto;
color: auto;
position: auto;
}
</style>
或者
从页面中动态删除css
<link id="uniformCss" type="text/css" rel="stylesheet" href="stylesheets/uniform.default.css" />
<script>
$('#uniformCss').delete();
</script>