如何將我的按鈕向右移動並使其響應。請任何人都可以幫助我?如何使按鈕響應?
這裏是我的代碼:
我在CSS中使用背景圖片在這裏
<!-- begin snippet: js hide: false -->
<!-- language: lang-html -->
<!-- Background image and Buttons -->
<div style="background-image:url('images/image.jpg'); padding-bottom: 30%;background-size: 100% 100%;" class="wrapper">
<div id="homebuttons" class="container">
<!-- Login with a button -->
<button style="top:170px; width:25%;" id="logintl" type="button" class="btn btn-info btn-lg sharp pull-right btn-group-vertical" title="Login with MiiSky" data-toggle="modal" data-target="#myModal"><span class="glyphicon glyphicon-lock"></span> | Login with SATMP</button>
<br>
<!-- Register with a button -->
<br>
<br><a href="register.html" style="top:200px; width:25%" id="registertl" title="Register with MiiSky" type="button" class="btn btn-info btn-lg sharp pull-right btn-group-vertical"><span class="glyphicon glyphicon-lock"></span> | Register with SATMP </a>
</div>
<!-- End homebuttons container-->
</div>
<!-- End Background image-->
我的按鈕是在正確的,但它沒有響應。
電流輸出: 按鈕遷出的圖像如下圖所示的圖像... 我想,以適應圖像,這樣即使瀏覽器尺寸減小它不應該被改變。 任何想法將是有益的
[1]:http://i.stack.imgur.com/F5Dty.jpg [2]:http://i.stack.imgur.com/9uL7G.png [3]:http://i.stack.imgur.com/ibhCa.png
1)擺脫使用內嵌造型。改用外部CSS。 2)你有一個'width = 25%'的類型。它應該是'寬度:25%'。 – jbutler483
這是正確的...但我的按鈕正在移出圖像如何使其適合圖像?所以,即使我減少瀏覽器大小,它應該適合,在圖像內? –
不要爲'top'聲明使用'px'值。改用'%'代替 – jbutler483