我在HTML / css模板中使用bootstrap3; 以下是我的网页的外观:
我希望星标与标题内嵌(即文本旁边)。 明星是按钮,点击表格后提交。 到目前为止,这是我的html代码:
<div class="col-6 col-sm-6 col-lg-4">
<h3>2004 Toyota Prius $7000
<form action="/post/unbookmark/" method="POST">
<input type='hidden' name='csrfmiddlewaretoken' value='ME7CDsBM2mPw2uWSyV28rgQMbE5bEDG2' />
<input type="hidden" name="bookmark_id" value="1839" />
<button type="submit" class="bookmark" id="1839" ><span class= "glyphicon glyphicon-star"> </span> </button>
</form>
</h3>
<p><small>hello, i'm selling 2004 toyota prius with 120k miles. with clear title 44-50 mpg really good on gas ! keyless ... </small></p>
<p>
<a class="btn btn-default" href="/search/1839/detail/" role="button">View details »</a>
</p>
答案 0 :(得分:1)
这适用于我使用Bootstrap 3.如果这对您不起作用,请检查您的bookmark
课程
<div class="col-6 col-sm-6 col-lg-4">
<form action="/post/unbookmark/" method="POST">
<h3>2004 Toyota Prius $7000 <button type="submit" class="bookmark" id="1839"><span class="glyphicon glyphicon-star"></span></button></h3>
<input type='hidden' name='csrfmiddlewaretoken' value='ME7CDsBM2mPw2uWSyV28rgQMbE5bEDG2' />
<input type="hidden" name="bookmark_id" value="1839" />
</form>
<p><small>hello, i'm selling 2004 toyota prius with 120k miles. with clear title 44-50 mpg really good on gas ! keyless ... </small></p>
<p><a class="btn btn-default" href="/search/1839/detail/" role="button">View details »</a></p>
</p>