我正在尝试在样式标签中使用css .up将图像的右侧移到div标签的底部,但是我发现运气不好,无法获得图像。能帮我怎样获得右侧图像使用保证金降至最低
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Case</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
div.round1 {
border: 1px solid deepskyblue;
border-radius: 4px;
height: 170px;
width: 30%;
margin: auto;
}
.up {
margin-bottom: 350;
}
</style>
</head>
<body>
<div class="round1">
<table>
<tr>
<td>
<img src="https://placeholdit.imgix.net/~text?txtsize=12&txt=128%C3%97128&w=128&h=128" alt="Mountain1" style="width:128px;height:128px;">
<br>If a browser cannot find an image, it will display the alternate text
</td>
<td>
<img class="up" src="https://placeholdit.imgix.net/~text?txtsize=15&txt=138%C3%9770&w=138&h=70" style="width:138px;height:70px;">
</td>
</tr>
</table>
</div>
<br>
<div align="left">
<div class="container">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#home">One</a>
</li>
<li><a data-toggle="tab" href="#menu1">Two</a>
</li>
<li><a data-toggle="tab" href="#menu1">Functional</a>
</li>
<li><a data-toggle="tab" href="#menu3">Three</a>
</li>
</ul>
<div class="tab-content">
<div id="home" class="tab-pane fade in active">
<h3>One</h3>
<p>If a browser cannot find an image, it will display the alternate textIf a browser cannot find an image, it will display the alternate text.</p>
</div>
<div id="menu1" class="tab-pane fade">
<h3>Two</h3>
<p>If a browser cannot find an image, it will display the alternate textIf a browser cannot find an image, it will display the alternate text</p>
</div>
<div id="menu2" class="tab-pane fade">
<h3>Three</h3>
<p>If a browser cannot find an image, it will display the alternate textIf a browser cannot find an image, it will display the alternate text</p>
</div>
<div id="menu3" class="tab-pane fade">
<h3>Others</h3>
<p>If a browser cannot find an image, it will display the alternate textIf a browser cannot find an image, it will display the alternate text</p>
</div>
</div>
</div>
</div>
</body>
</html>
最佳答案
您忘记使用px
将您的代码更改为:
.up {
margin-bottom:350**px**;
}
关于html - 底边距:100px不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40021534/