字体大小190%和200%之间的差异

时间:2017-02-13 04:48:09

标签: html css

当我设置font-size:200%

  

enter image description here

当我设置font-size:190%:

  

enter image description here

我在firefox上测试了它,我找到了它。

我不知道为什么“font-size:200%”会产生这些差异......

body {
  font-size: 190%;
  font-family: sans-serif;
}
input {
  width: 300px;
  padding: 5px 5px 12px 5px;
  font-size: 25px;
  border-radius: 5px;
  border: 1px gray solid;
}
#wrapper {
  margin: 0, auto;
  width: 1000px;
}
lable {
  width: 100px;
  float: left;
}
.element-container {
  margin-bottom: 5px;
}
<div id="wrapper">
  <div class="element-container">
    <lable for="email">Email</lable>
    <input type="text" name="email" id="email" placeholder="input the email here">
  </div>
  <div class="element-container">
    <lable for="phone">Telephone</lable>
    <input type="text" name="phone" id="phone" placeholder="input the phone number here">
  </div>
</div>

1 个答案:

答案 0 :(得分:0)

你可以给它一个5%的padding-right,这会使盒子远离文本。

lable {
 width: 100px;
 float: left;
 padding-right:5%;
}