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>
    

      

  • 相关阅读:
    异或运算的运用
    HDU1251(统计难题)
    待解决题目
    tarjan算法模板
    FZU1465
    边双联通分量(构造边双联通图)
    UVa 12558
    codeforce Error Correct System
    codeforce The Art of Dealing with ATM
    ~0u >> 1
  • 原文地址:https://www.cnblogs.com/alex-hrg/p/9623782.html
Copyright © 2011-2022 走看看