如何避免默认的Css更改? [英] How to Avoid Default Css Changes?

查看:76
本文介绍了如何避免默认的Css更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Project包含以所有形式应用的Default.css。

但是现在我有一个表单,其中我不想要default.css样式,所以我该怎么做。?

I have Project Which Contain Default.css that is applied in all form.
But now i have one form in which i dont want default.css styles so how can i do that.?

推荐答案

你可以给那个表格一个类,如下:

You can give that form a class, like this:
<form class="yourClassHere" ...>



在你的default.css样式表,转到表单标记的规则,并确保您使用该类排除表单:


And in your default.css stylesheet, go to the rules for a form tag and make sure that you exclude the form with that class:

form:not(.yourClassHere) {
    /* style rules here */
}



然后,你可以添加一些特定于该表单的新规则:


And then, you can add some new rules, specific for that form:

form.yourClassHere {
    /* style rules here */
}


您可以给出样式表链接参考的ID。



< link href =default.cssid =defaulttype =text / css/>



在页面级别,请写下面的代码。



< script type =text / javascript>
You can give the id of your stylesheet link reference.

<link href="default.css" id="default" type="text/css" />

On page level, write below code.

<script type="text/javascript">


(document).ready(function(){
(document).ready(function () {


这篇关于如何避免默认的Css更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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