所以我在這里運(yùn)行bootstrap。我試圖讓我的表單看起來像這樣:(但是我不想讓它們?cè)谕恍猩希窍M鼈冊(cè)诿啃猩祥g隔開。)
下面是我的模態(tài)當(dāng)前的樣子:
請(qǐng)注意,我不能改變我的引導(dǎo)版本,因?yàn)檫@將導(dǎo)致我的網(wǎng)站功能障礙。
我的代碼:
{% extends "_base.html" %}
{% block content %}
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<h1 class="h3 mb-3 fw-normal text-center">Add funds into balance</h1><br>
<div class="form-floating">
<a href="#" data-toggle="modal" data-target="#exampleModal" onclick="crypto">USDT-TRX</a>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="col-11">
<h4 class="modal-title" id="exampleModalLabel">Payment with USDT-TRC20</h4>
</div>
<button type="button" class="close" data-dismiss= "modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<h5>Amount to deposit:</h5>
<form>
<div class="form-group">
<div class="col-xs-4">
<div class="input-group-append"><div class="input-group-text">USD </div><input type="text" class="form-control" id="recipient-name">
</div>
<div class="form-group">
<span class="input-group-text">USDT-TRC20 </span><input type="text" class="form-control" id="recipient-name"></span>
</div>
</form>
</div>
<button type="button" class="btn btn-primary">Create Invoice</button>
</div>
</div>
</div>
{% endblock %}
base.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>mysite</title>
<!-- meta -->
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- styles -->
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
<link rel="stylesheet" href="{{url_for('static', filename="styles.css")}}">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.2/css/bootstrap-select.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.2/js/bootstrap-select.min.js"></script>
{% block css %}{% endblock %}
</head>
<body>
{% include "navigation.html" %}
<div class="container">
<br>
<!-- messages -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
{{message}}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
</div>
<div class="col-md-4"></div>
</div>
{% endif %}
{% endwith %}
<!-- child template -->
{% block content %}{% endblock %}
</div>
<!-- scripts -->
<script src="https://code.jquery.com/jquery-3.6.1.min.js" type="text/javascript"></script>
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" crossorigin="anonymous"></script>
{% block js %}{% endblock %}
</body>
</html>