像素大小差异

时间:2017-03-03 15:56:58

标签: html

为什么Chrome和屏幕截图之间存在差异?

我使用bootstrap。我想要50px的真实像素。

HTML

<div class="modal-dialog" role="document"> 
    <div class="modal-content"> 
        <div class="modal-header"> </div> 
        <div class="modal-body"> </div> 
        <div class="modal-footer"> </div> 
    </div> 
</div> 

CSS

 .modal-header{ 
       height: 50px; 
 } 

enter image description here

1 个答案:

答案 0 :(得分:0)

在我的样本中使用你的代码我在标题上有50个高度,所以我不确定你看到了什么 Screenshot

您遇到哪个浏览器问题?

&#13;
&#13;
.modal-header{ 
       height: 50px; 
 } 
&#13;
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>

<div class="modal-dialog" role="document"> 
    <div class="modal-content"> 
        <div class="modal-header">Modal Header </div> 
        <div class="modal-body">Modal Body</div> 
        <div class="modal-footer"> The footer is here</div> 
    </div> 
</div> 


 
&#13;
&#13;
&#13;