html - 字体大小 190% 和 200% 之间的区别

标签 html css

当我设置 font-size: 200%

enter image description here

当我设置 font-size: 190% 时:

enter image description here

我在firefox上测试了一下,找到了。

我不知道为什么“字体大小: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>

最佳答案

您可以给它一个 5% 的 padding-right,这将使框远离文本。

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

关于html - 字体大小 190% 和 200% 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42196825/

相关文章:

javascript - jQuery 菜单系统 - 显示没有顶级菜单项扩展以适应的子菜单项

css - 网站打开时显示缓动效果

html - 如何创建单击时改变颜色的 CSS3 动画圆圈?

css - 具有不透明度和过渡效果的动画混合模式

html - 在滚动时移动到页面顶部的固定元素 - 仅限 CSS

php - 需要帮助 : how to design my webpage that sorts data from a database?

html - 非透明 div 内的透明文本

html - CSS 最大宽度 100% 响应式设计

html - 导航栏水平+垂直居中

html - 移动 li 文本但不移动列表类型图像