【发布时间】:2020-12-23 19:54:00
【问题描述】:
所以我有以下代码:
{% load static %}
<!DOCTYPE html>
<html>
<head>
<title>Verification Code Email</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<style>
.insta-icon{width:50%; float:right;}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-1 offset-1 border-right"> # This one right here
<img class="insta-icon"src="{% static '/images/instagram_icon.png' %}">
</div>
<div class="col-10"> b</div>
</div>
</div>
<div class="container">
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
</body>
</html>
现在,当我只执行border 时,会显示边框,当我执行border-bottom 或border-top 时,会显示边框。但是,当我使用border-left 或border-right 时,不会显示边框轮廓。
另外,我尝试通过向 div 类添加 insta-nav 类来使用样式,并通过添加 border:1px 覆盖样式,但没有添加边框。
为什么这两个原因会这样?任何帮助将不胜感激
【问题讨论】:
标签: django border bootstrap-5