zoukankan      html  css  js  c++  java
  • !important强制此css最强,其它被覆盖

    有时我们引用别人写的插件不知道某个样式在哪儿,或者想要覆盖其它样式,就要用到 !importan;

    例如以下是引用boostrap,默认bootstrap都是圆边框,我们不想用,例子中同一样式也出现多个importan,则写在最下面的生效。

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            .no-radius{
                border-radius: 0 !important;
            }
            .radius-8{
                border-radius: 8px !important;
            }
        </style>
        <link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.css" />
    </head>
    <body style="background: blue;">
    
        <button type="button" class="btn btn-default navbar-btn  radius-8 no-radius">Sign in</button>
    
    <script src="../jquery-3.3.1.js"></script>
    <script src="../bootstrap-3.3.7-dist/js/bootstrap.js"></script>
    </body>
    </html>
    

      

  • 相关阅读:
    spring 管理struts2的一个问题
    Log4j的使用
    json
    jbpm
    jbpm的开发流程
    HTML5 INPUT新增属性
    JQuery Mobile
    struts2配置中通配符
    2010新的开始,先留个脚印。:)
    EyesBaby1.0使用帮助文档
  • 原文地址:https://www.cnblogs.com/alex-hrg/p/9623782.html
Copyright © 2011-2022 走看看