Sih*_*Lee 6 django border bootstrap-5
所以我有以下代码:
{% 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>
Run Code Online (Sandbox Code Playgroud)
现在,当我执行 just 时border,会显示边框,当我执行border-bottomor时border-top,会显示边框。但是,当我使用border-left或时border-right,不会显示边框轮廓。
另外,我尝试通过向 div 类添加一个insta-nav类来使用样式,并通过添加 来覆盖样式border:1px,但未添加边框。
为什么会是这两个原因呢?任何帮助,将不胜感激
HDP*_*HDP 11
您需要在 bootstrap 5 中使用border-startorborder-end代替border-leftor 。border-right
水平方向敏感变量、实用程序和 mixins 被重命名为更逻辑的名称 \xe2\x80\x94start并end代替Bootstrap 5中的left和。right
您可以在此处查看更多 Bootstrap 5 迁移详细信息:\n https://getbootstrap.com/docs/5.0/migration/#sass
\n