如何让文字出现在左上角?
How to make text appear at the top left corner?
这是我要实现的 UI 原型
这是我目前拥有的 JSFiddle 和我尝试过的 CSS
.help_header {
transform: translateY(-100px);
padding-bottom: 30px;
margin-bottom: 30px;
}
有谁知道如何让文字出现在顶部,而不是底部?
我试过了padding-bottom which made the most sense to me(distance between the bottom border of div and the text) but that didn't work. I also tried margin-bottom and transform:translateY
但这些属性也不起作用。
html:
<body>
<div id="header">
<img src="http://imgur.com/x45xmG3.jpg" />
<div class="help_header">
<span>Contact us</span>
<span>Forum</span>
</div>
</div>
</body>
css:
body {
padding:0;
margin:0;
}
#header {
height: 100px;
float:left;
}
.help_header {
float:right;
}
你在找这样的东西吗:JSFiddle
这是我要实现的 UI 原型
这是我目前拥有的 JSFiddle 和我尝试过的 CSS
.help_header {
transform: translateY(-100px);
padding-bottom: 30px;
margin-bottom: 30px;
}
有谁知道如何让文字出现在顶部,而不是底部?
我试过了padding-bottom which made the most sense to me(distance between the bottom border of div and the text) but that didn't work. I also tried margin-bottom and transform:translateY 但这些属性也不起作用。
html:
<body>
<div id="header">
<img src="http://imgur.com/x45xmG3.jpg" />
<div class="help_header">
<span>Contact us</span>
<span>Forum</span>
</div>
</div>
</body>
css:
body {
padding:0;
margin:0;
}
#header {
height: 100px;
float:left;
}
.help_header {
float:right;
}
你在找这样的东西吗:JSFiddle