【发布时间】:2015-11-10 05:25:00
【问题描述】:
我正在尝试将我的徽标放在我网页标题中的文本旁边。我玩过 's,但我能做的最好的就是让徽标位于测试的顶部。我怎样才能解决这个问题?
<header>
<div class="header-content">
<div class="header-content-inner">
<img src="img/blue.png"><h1>WELCOME</h1>
<p></p>
</div>
</header>
<!-- CSS BEGINS -->
header {
position: relative;
width: 100%;
min-height: auto;
text-align: center;
color: #000;
background-image: url();
background-position: center;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
}
header .header-content {
position: relative;
width: 100%;
padding: 100px 15px;
text-align: center;
}
header .header-content .header-content-inner h1 {
margin-top: 0;
margin-bottom: 0;
text-transform: lowercase;
font-weight: 700;
color:gray;
}
【问题讨论】:
-
您可以尝试使用CSS属性
float