Html 更改按钮和文本相对于表格的位置
我有一张桌子,上面有一个右边的按钮 在左边有一些文字。(它们平行) 目前它非常接近下表,我想移动 文本和按钮稍微向上一点,我应该怎么做Html 更改按钮和文本相对于表格的位置,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我有一张桌子,上面有一个右边的按钮 在左边有一些文字。(它们平行) 目前它非常接近下表,我想移动 文本和按钮稍微向上一点,我应该怎么做 <h4 style="display:inline">Users Table</h4> <div style="float:right" class="text-right"> <a href="#" id="addRow"><i class="glyphicon glyphicon-plus"&g
<h4 style="display:inline">Users Table</h4>
<div style="float:right" class="text-right">
<a href="#" id="addRow"><i class="glyphicon glyphicon-plus"></i> New</a>
</div>
//Here start the table
@* List of users *@
<table class="table table-striped ">
用户表
//开始吃饭吧
@*用户名单*@
如果我使用
它会将其向上移动很多,有没有一种方法可以按像素进行移动 只需在文本和按钮周围划一个div,并在底部加上一些边距即可
<div style="margin-bottom: 20px">
<h4 style="display:inline">Users Table</h4>
<div style="float:right" class="text-right">
<a href="#" id="addRow"><i class="glyphicon glyphicon-plus"></i> New</a>
</div>
</div>
//Here start the table
@* List of users *@
<table class="table table-striped ">
用户表
//开始吃饭吧
@*用户名单*@
只需在文本和按钮周围划一个div,并在底部加上一些边距即可
<div style="margin-bottom: 20px">
<h4 style="display:inline">Users Table</h4>
<div style="float:right" class="text-right">
<a href="#" id="addRow"><i class="glyphicon glyphicon-plus"></i> New</a>
</div>
</div>
//Here start the table
@* List of users *@
<table class="table table-striped ">
用户表
//开始吃饭吧
@*用户名单*@
只需在文本和按钮周围划一个div,并在底部加上一些边距即可
<div style="margin-bottom: 20px">
<h4 style="display:inline">Users Table</h4>
<div style="float:right" class="text-right">
<a href="#" id="addRow"><i class="glyphicon glyphicon-plus"></i> New</a>
</div>
</div>
//Here start the table
@* List of users *@
<table class="table table-striped ">
用户表
//开始吃饭吧
@*用户名单*@
只需在文本和按钮周围划一个div,并在底部加上一些边距即可
<div style="margin-bottom: 20px">
<h4 style="display:inline">Users Table</h4>
<div style="float:right" class="text-right">
<a href="#" id="addRow"><i class="glyphicon glyphicon-plus"></i> New</a>
</div>
</div>
//Here start the table
@* List of users *@
<table class="table table-striped ">
用户表
//开始吃饭吧
@*用户名单*@
既然您使用的是引导,那么您可以做一个简单的操作来实现这一点
<div class="row">
<div class="col-md-6>
<h4>Users Table</h4>
</div>
<div class="col-md-6>
<a href="#" id="addRow"><i class="glyphicon glyphicon-plus"></i> New</a>
</div>
</div>
<!-- table -->
我不知道什么是
。text right
功能,但可能可以应用到按钮上。因为您使用的是引导,所以可以简单地实现这一点
<div class="row">
<div class="col-md-6>
<h4>Users Table</h4>
</div>
<div class="col-md-6>
<a href="#" id="addRow"><i class="glyphicon glyphicon-plus"></i> New</a>
</div>
</div>
<!-- table -->
我不知道什么是
。text right
功能,但可能可以应用到按钮上。因为您使用的是引导,所以可以简单地实现这一点
<div class="row">
<div class="col-md-6>
<h4>Users Table</h4>
</div>
<div class="col-md-6>
<a href="#" id="addRow"><i class="glyphicon glyphicon-plus"></i> New</a>
</div>
</div>
<!-- table -->
我不知道什么是
。text right
功能,但可能可以应用到按钮上。因为您使用的是引导,所以可以简单地实现这一点
<div class="row">
<div class="col-md-6>
<h4>Users Table</h4>
</div>
<div class="col-md-6>
<a href="#" id="addRow"><i class="glyphicon glyphicon-plus"></i> New</a>
</div>
</div>
<!-- table -->
我不知道
.text right
有什么作用,但可能可以应用到按钮上。是的,使用CSS可以添加如下填充:
style="padding-top:0.5px;"
或
是的,使用CSS可以添加如下填充:
style="padding-top:0.5px;"
或
是的,使用CSS可以添加如下填充:
style="padding-top:0.5px;"
或
是的,使用CSS可以添加如下填充:
style="padding-top:0.5px;"
或
在css中执行此操作:
table.table { clear:both; margin-top:10px;}
在css中执行此操作:
table.table { clear:both; margin-top:10px;}
在css中执行此操作:
table.table { clear:both; margin-top:10px;}
在css中执行此操作:
table.table { clear:both; margin-top:10px;}
感谢黑洞,我已经有了样式中的“display:inline”>我可以添加填充吗?如果是,如何添加?欢迎。是的,你可以,用分号将命令分开,如下所示:style=“display:inline;padding top:0.5px;”我尝试了一下,但什么都没有发生,知道为什么吗?我认为填充在内联元素上不起作用。。顺便说一句,“padding bot”中的键入应该是“bottom”@webkit I play Dota2,所以我总是说bot而不是bottom:DThanks black hole,我已经在样式中有了“display:inline”>我可以添加填充吗?如果可以,如何添加?欢迎。是的,你可以,只需用分号分隔命令,如下所示:style=“display:inline;padding top:0.5px;”我尝试了一下,但什么都没发生,知道为什么吗?我认为填充在内联元素上不太合适。。顺便说一句,“padding bot”中的键入应该是“bottom”@webkit I play Dota2,所以我总是说bot而不是bottom:DThanks black hole,我已经在样式中有了“display:inline”>我可以添加填充吗?如果可以,如何添加?欢迎。是的,你可以,只需用分号分隔命令,如下所示:style=“display:inline;padding top:0.5px;”我尝试了一下,但什么都没发生,知道为什么吗?我认为填充在内联元素上不太合适。。顺便说一句,“padding bot”中的键入应该是“bottom”@webkit I play Dota2,所以我总是说bot而不是bottom:DThanks black hole,我已经在样式中有了“display:inline”>我可以添加填充吗?如果可以,如何添加?欢迎。是的,你可以,只需用分号分隔命令,如下所示:style=“display:inline;padding top:0.5px;”我尝试了一下,但什么都没发生,知道为什么吗?我认为填充在内联元素上不太合适。。顺便说一句,“padding bot”中的打字错误应该是“bottom”@webkit I play Dota2,所以我总是说bot而不是bottom:d因为您使用的是float,所以它下面的元素(表)应该被清除,以便能够使用边距:)请参见下面的答案。因为您使用的是float,所以元素(表)是下面的元素(表)应该被清除,以便能够并使用边距:)请参阅下面的答案。因为您使用的是浮点,所以它下面的元素(表)应该被清除,以便能够并使用边距:)请参阅下面的答案。因为您使用的是浮点,所以它下面的元素(表)应该被清除,以便能够并使用边距:)请参阅下面的答案。