css - 如何自定义 MDBootstrap 模态的边框半径

标签 css twitter-bootstrap

我正在使用 MDBootstrap在我的元素中,无法自定义 MDBootstrap 模态的边框半径。

我想为我的模态制作 border-radius: 0

我的 html 代码:

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#basicExample" id="modalBtn">
    Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade right" id="basicExample" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-full-height modal-right" role="document">
        <!--Content-->
        <div class="modal-content">
            <!--Header-->
            <div class="modal-header">
                <h4 class="modal-title w-100" id="myModalLabel">Modal title</h4>
            </div>
            <!--Body-->
            <div class="modal-body">
                ...
            </div>
            <!--Footer-->
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
        <!--/.Content-->
    </div>
</div>
<!-- Modal -->

我试过:

.modal{
    border-radius: 0 !important;
}

但它不能正常工作。 我附上图片,以便您可以理解。 enter image description here

我也试过:

.modal{
    border-radius: 25% !important;
}

但它是这样工作的:enter image description here

最佳答案

你定位错误的选择器而不是你应该使用下面的代码来重置模态边框

.modal-content{
      border-radius: 0;
}

关于css - 如何自定义 MDBootstrap 模态的边框半径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44204510/

相关文章:

java - 使 Java 小程序占用父元素的 100% 高度

javascript - 在 div 中获取字体和标题标签

html - 我可以让 &lt;input&gt; 框的文本换行吗?

jquery - Bootstrap Carousel 只加载一张图片

css - 在 webapp 元素中包含 Bootstrap 资源的一般最佳实践是什么?

javascript - Bootstrap 模态将我的 jumbotron 推到 chrome 左侧而不是边缘?

用于显示空 div 的 CSS

一栏中的CSS 2图片全宽

css - Angularjs 使用 ng-if 根据屏幕尺寸调用 clearfixes

css - 如何在 css 和 html5 中创建带有曲线的 div?