如何缩小横幅图片中间文字的大小?每当我缩小字体大小时,照片都会在上方移动,并且图像的位置会发生变化。我想更改字体大小,使文本看起来干净,在右侧,不与人重叠,我也希望标语看起来比标题文本小。 我还希望它在移动设备上看起来更干净。它在移动浏览器中看起来很混乱
这就是它的外观 - http://imgur.com/a/8u7Cv
HTML CODE
<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
}
}
答案 0 :(得分:0)
不是更好地增加字体大小以将图像和文本放入标题标记[object SVGsomething] highlight
,而是增加两者的大小