html - 文字间距大,如何解决?

标签 html css

我有两个 div,在浏览器中预览时它们之间有很大的差距。

代码:

<div id="title-1">
        <p>XXX is pleased to announce the launch of our Social Enterprise - Experience Us</p>
    </div>
    <div id="maindescription-1">
        <p>XXX are conducting unique tours to celebrate us, the beating heart of our culture in Scotland.  We will be 
        taking people on a journey through Glasgow, Scotland on a guided tour about the stories of the locals and pioneers that
        made Glasgow what it is today, and then expanding the experiences with tasting tours of the variety of delicious cuisines
        on offer.  Please see below for more information:</p>

CSS:

#title-1 {
    font: normal normal bold 100% "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    float: left;
    width: 850px;
    padding: 10px;
    color: #FFFF00;
    text-align: justify;
    vertical-align: baseline;
}
#maindescription-1 {
    font: 100% "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    float: left;
    width: 850px;
    padding: 10px;
    color: #FFFFFF;
    text-align: justify;
    vertical-align: baseline;
}

如何解决这个问题?

最佳答案

您可以使用重置来防止浏览器默认设置偷偷摸摸地出现在您身上。我喜欢 Eric Meyer 的重置: http://bkaprt.com/rwd/9/

关于html - 文字间距大,如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12530860/

相关文章:

javascript - 轮播不自动播放也不可点击(Bootstrap 3)

css - 径向渐变在 Firefox 中不起作用

jquery - 根据li标签的组合宽度动态设置ul的宽度

html - 禁用的按钮在 Angular 6 中不起作用

html - :before Pseudo element behind absolute positioned parent

javascript - 为什么在 Vue.js 或 React 中使用组件?

css - 如何通过内联 css 样式使用 Watir 查找元素

javascript - 有没有办法以某种方式同时拥有绝对位置(底部)和同一 div 的多个并排?

javascript - EPUB:现有 .XML 文件的 HTML 表单值

html - 输入 HTML CSS 中的按钮