2012-12-29 12 views
1

enter image description here如何使我的頭看起來移動

我的繼承人問題,更好地我怎樣才能讓我的頭看起來更好

以下是編碼...!

1的index.php

<div class="header"> 
<div class="headerFont"><a href="index.php">Yo! Yo! Honey Singh..!!</a> 
</div> 
<div class="Login"> 
<form> 
Email :<input type="text"> 
Password :<input type="password"> 
<input type="submit" value="Login" > 
<input type="button" value="register"> 
</form> 
</div> 
</div> 

2網絡的style.css

.header{ 
top:0; 
left:0; 
padding:10px; 
background:#00688B; 
width:100%; 
height:footer-<length>; 
box-shadow:2px 2x 5px #08298A; 
border:1px solid black; 
text-shadow:2px 2px black; 
} 

.header a{ 
color:white; 
} 

.headerFont{ 
font-family:MATURA MT ; 
font-size:22px; 
display:table-cell; 
} 

.Login{ 
display:block; 
position:absolute; 
top:15px; 
right:50px; 
} 

3移動-的style.css

.header { 
width: auto; 
} 

現在我需要知道我如何能得到按鈕就像網站[PIC] - >http://i.stack.imgur.com/vlx09.png 如何使按鈕在移動設備上可見,但不能在電腦上運行。 ???

+0

所以......去讓一個按鈕這樣的呢?你遇到的問題是什麼?你想要一個人來爲你做嗎? – Bojangles

+0

我知道如何製作按鈕,但 我如何使按鈕在手機上可見,但不能在電腦上運行。 –

回答

-1

你可以使用javascript來檢查請求瀏覽器的類型。

您可以像使用JavaScript一樣檢測移動大巴的請求。

if ((screen.width < 480) || (screen.height < 480)) { 
    location.replace('/mobile/'); 
    /*Get buggon element by id and show it else hide it*/ 
    } 

或者您可以使用下面的JavaScript來制定移動瀏覽器然後隱藏該按鈕。

https://github.com/miohtama/detectmobile.js

+2

要在不同大小的視口中使用不同的佈局,媒體查詢和CSS是現代的方式。 –

+0

這取決於先生,Jukka,如果你不想做太多的Javascript不好? –

+0

媒體查詢不是Javascript! –

相關問題