如何在左上角显示文字?

时间:2015-07-03 17:57:54

标签: html css user-interface user-experience

这是我试图实现的UI原型

enter image description here

以下是我目前拥有的JSFiddle以及我尝试过的CSS

.help_header {
     transform: translateY(-100px); 
    padding-bottom: 30px;
    margin-bottom: 30px;
 }

有谁知道如何让文字显示在顶部而不是底部?

我尝试了padding-bottom这对我来说最有意义(div的底部边界和文本之间的距离),但这不起作用。我还尝试了margin-bottomtransform:translateY  但这些属性也不起作用。

1 个答案:

答案 0 :(得分:0)

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