gpt4 book ai didi

html - 如何减小页眉介绍文本和介绍标题的大小

转载 作者:行者123 更新时间:2023-11-28 04:21:42 24 4
gpt4 key购买 nike

如何缩小横幅图片中间的文字?每当我减小字体大小时,照片就会在上方并且图像的位置会发生变化。我想更改字体大小,使文本看起来干净且位于右侧,不会与人重叠,而且我希望标语看起来比标题文本小。我还希望它在移动设备上看起来更干净。在移动浏览器中看起来很乱

这是它的样子- http://imgur.com/a/8u7Cv

HTML 代码

 <header>
<div class="container">
<div class="intro-text">
<div class="intro-lead-in">Welcome To AssignmentHelpStreet</div>
<div class="intro-heading">The path you won't turn your back on</div>
<a href="#about" class="page-scroll btn btn-xl">About Us</a>
</div>
</div>
</header>

CSS 代码

header{
background-image:url(../img/bg.jpg);
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center center;
-webkit-background-size:cover;
-moz-background-size:cover;
background-size:cover;
-o-background-size:cover;
text-align:right;
color:black;
}
header .intro-text{
padding-top:100px;padding-bottom:50px
}
header .intro-text .intro-lead-in{
font-family:"Droid Serif","Helvetica Neue",Helvetica,Arial,sans-serif;font-style:italic;font-size:22px;line-height:22px;margin-bottom:25px
}
header .intro-text .intro-heading{
font-family:Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;font-weight:700;font-size:50px;line-height:50px;margin-bottom:25px
}
@media (min-width:768px){
header .intro-text{
padding-top:300px;padding-bottom:200px
}
header .intro-text .intro-lead-in{
font-family:"Droid Serif","Helvetica Neue",Helvetica,Arial,sans-serif;font-style:italic;font-size:40px;line-height:40px;margin-bottom:25px
}
header .intro-text .intro-heading{
font-family:Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;font-weight:700;font-size:75px;line-height:75px;margin-bottom:50px
}
}

最佳答案

与其增加字体大小,不如将图像和文本放入标题标签中 <h2></h2> , 它会增加两者的大小

关于html - 如何减小页眉介绍文本和介绍标题的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42176527/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com