[英]Why is there no space between my URLs when page is loaded with AJAX?
I have the following code for four a
elements with Bootstrap's btn
class on them. 我对带有Bootstrap的
btn
类的四个a
元素具有以下代码。
<a href="{% url 'qna:answer-create-view' object.pk %}" class="btn btn-primary btn-xs">Answer</a>
<a href="#" class="btn btn-default btn-xs"><i class="fa fa-thumbs-o-up"></i> | 0</a>
<a href="#" class="btn btn-default btn-xs"><i class="fa fa-thumbs-o-down"></i> | 0</a>
<a href="#" class="btn btn-default btn-xs">Follow</a>
Normally there was a little space between them when I loaded them as an HTML page. 通常,当我将它们作为HTML页面加载时,它们之间有一些空间。 However, I implemented
load()
function in my JS file and is now loading part of the page containing those elements so that it takes less time to load a new page. 但是,我在JS文件中实现了
load()
函数,现在正在加载包含这些元素的页面的一部分,以便花费更少的时间加载新页面。 But in this method there are no spaces between those elements and it looks aesthetically unpleasant. 但是在这种方法中,这些元素之间没有空格,并且在美学上看起来不愉快。 How can I fix that?
我该如何解决?
Just add margin to them using CSS 只需使用CSS为他们增加利润
.btn{
margin: 0 5px;
display: inline-block;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.