我试图弄清楚如何使按钮水平而不是垂直。
{% extends 'base.html' %}
{% block title %}
Register
{% endblock %}
{% block content %}
<form action="/registration/customer/" method="post">{% csrf_token %}
<button style="font-size : 30px;width:350px;height:300px;" type="submit" name="type" value="customer"
class="btn btn-success">Zákazník
</button>
</form>
<form action="/registration/freelancer/" method="post"> {% csrf_token %}
<button style="font-size : 30px;width:350px;height:300px;" type="submit" name="type" value="freelancer"
class="btn btn-success">Predajca
</button>
</form>
{% endblock %}
有两个按钮,每个按钮应运行不同view
。我想让它们并排。
使用css样式
form {
display:inline;
}
这将以其臀部的形式内联显示表单(将屏幕调整得更宽,您将看到结果)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句