-1
我有一箇中間有很多項目的網頁,我想在頁面左上角添加一些小文本,上面寫着「您已登錄如用戶名「。任何想法如何做到這一點?如何將文本對齊屏幕的一角
編輯:我的HTML頁面
<p style="position:fixed;top:0:right:0;color:blue" size="2">You are logged in as: {{
<body style="margin-left:100;margin-top:50">
<table border="2">
<tr>
<th>Name</th>
<th>Created By</th>
<th>IP Range</th>
<th>Date to Run</th>
</tr>
<form id="checkboxes" method="post" action="myurl">
<tr>
<td><input type="checkbox" name="checkable" /></td>
<td><a href="mysecondurl">name</a></td>
<td>user</td>
<td>ip</td>
<td>time</td>
</tr>
<select id="dropdown">
<option />
<option value="Delete">Delete</option>
<option value="Change">Change</option>
</select>
<input type="hidden" name="isDeleting" value="True"/>
<input type="submit" value="Go" />
</form>
</table><br />
<form method="post" action="{% url 'Minion.views.add' %}">
<input type="submit" value="Add" />
</form>
<form method="post" action="{% url 'Minion.views.index' %}">
<input type="hidden" name="loggingOut" value="True">
<input type="submit" value="Logout" />
</form>
</body>
這與下面給出的建議,它只是疊加在頁面的標題的用戶名文本。
準備一個簡單的jsfiddle來演示你想要的東西可能會更適合你。 – Lion
你是什麼意思? – avorum
一種可能的方法是使用絕對定位。 – Nelson