Mik*_*ers 0 html css css3 twitter-bootstrap
它应该如何:http://prntscr.com/59nrxz
它是怎么回事:http://prntscr.com/59nsfg
我的HTML:
<div class="col-md-6 logo" id="header-logo">
<a href="{{ path('static_page', {template:'home'}) }}" title="Return Home">
<img alt="logo" src="static/img/Risne-Logo.png"></img>
<span class="logo_left">RISNE</span>
<span class="logo_right">STARS</span>
</a>
</div>
Run Code Online (Sandbox Code Playgroud)
我的CSS:
.logo_left, .logo_right {
font-family: "Droid Sans";
font-size: 34px;
top: -20px;
}
.logo_right {
color: #FECD0F;
}
.logo_left {
color: #234371;
}
Run Code Online (Sandbox Code Playgroud)
我不关心字体或任何东西,我只需要让文本移动到正确的位置.
根据你的需要,一个简单的position: relative可以做到这一点.
.logo{
position: relative;
top: -20px; /* This will move it 20px up */
left: 20px; /* This will move it 20px to the right */
}
Run Code Online (Sandbox Code Playgroud)
那是假设你把你的两个都span放在一个div(或标题)中logo.