html – 字体添加了小的左边距,无法用CSS覆盖

html – 字体添加了小的左边距,无法用CSS覆盖,第1张

概述正如您在下面的代码片段中看到的那样,单词“Rails”的第一个字母有一些无法用CSS删除的烘焙空间,因此它不与其他元素对齐.我尽可能多地使用浏览器样式,但仍有余量. 有人可以解释为什么会发生这种情况/这种利润来自哪里,然后是绕过它的方法? .debug-border { border-left: 1px solid blue;}.main-title { font-size: 100p 正如您在下面的代码片段中看到的那样,单词“Rails”的第一个字母有一些无法用CSS删除的烘焙空间,因此它不与其他元素对齐.我尽可能多地使用浏览器样式,但仍有余量.

有人可以解释为什么会发生这种情况/这种利润来自哪里,然后是绕过它的方法?

.deBUG-border {  border-left: 1px solID blue;}.main-Title {  Font-size: 100px;}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/CSS/bootstrap.min.CSS" rel="stylesheet" /><div >  <div >    <div >      <h3 >Rails</h3>      <!--We are an international tech company etc etc..-->      <p >We are an international tech company.        <br>We build products.</p>      <div >        <a href="#" >what we do</a>      </div>    </div>  </div></div>
解决方法 这可以被视为黑客攻击.但如果这样可行,你可以自由地继续前进.使用否定文本缩进.请注意,它不可扩展.

.deBUG-border {  border-left: 1px solID blue;}.main-Title {  Font-size: 100px;  text-indent: -5px;}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/CSS/bootstrap.min.CSS" rel="stylesheet" /><div >  <div >    <div >      <h3 >Rails</h3>      <!--We are an international tech company etc etc..-->      <p >We are an international tech company.        <br>We build products.</p>      <div >        <a href="#" >what we do</a>      </div>    </div>  </div></div>

预习

总结

以上是内存溢出为你收集整理的html – 字体添加了小的左边距,无法用CSS覆盖全部内容,希望文章能够帮你解决html – 字体添加了小的左边距,无法用CSS覆盖所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/web/1070842.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存