【问题标题】:Bootstrap 3 - remove underline from modal-dialogBootstrap 3 - 从模态对话框中删除下划线
【发布时间】:2015-06-14 13:47:35
【问题描述】:

我有一个模式对话框,当我悬停时它总是显示下划线。

我不知道如何解决这个问题,希望你能帮忙!

<!-- Modal content-->
<div class="modal-content">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">&times;</button>
    <h4 class="modal-title">Login</h4>
  </div>
  <div class="modal-body">
    <? include "_inc/widgets/login.php"; ?>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">Sluit</button>
  </div>
</div>

以及我在login.php 页面中的内容

<!-- Error box -->
<pre class="alert-danger" id="errors" style="display:none;"></pre><!-- End error box -->

<!-- Login Form -->
<form style="display:block;" class="form-group" role="form" id="login" method="post">
  <div class="form-group" id="username-group">
    <label for="username">Gebruikersnaam:</label>
    <input type="username" class="form-control" id="login_username">
  </div>
  <div class="form-group">
    <label for="pwd">Wachtwoord:</label>
    <input type="password" class="form-control" id="login_pwd">
  </div>
  <div class="checkbox">
    <label><input type="checkbox">Onthoud mij</label>
  </div>
  <button type="submit" class="btn btn-default">Login</button>
  <button style="float:right;" type="button" class="btn btn-info" id="toRegister">Of schrijf in</button>
</form><!-- End Login -->

【问题讨论】:

    标签: html css twitter-bootstrap underline


    【解决方案1】:

    尝试在您的 css 文件中添加此 css。

    .modal-content {
       text-decoration: none !important;
    }
    

    !important 应确保无论状态如何,都没有下划线。

    我认为这应该可行。

    【讨论】:

    • 改用 .modal-content *
    【解决方案2】:

    这应该可以工作

    .modal-header {
        border: none;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-02-17
      • 2014-05-03
      • 1970-01-01
      • 1970-01-01
      • 2013-10-27
      • 2019-11-25
      • 2011-04-26
      相关资源
      最近更新 更多