2015-11-06 67 views
-1

所以我在一個我正在設計的網站上實現了一個按鈕,一個圓圈內的雙角度向上箭頭,它允許用戶快速回滾到頂部:button媒體查詢按鈕的麻煩

現在我有一個媒體查詢,應該縮小比767px更窄的屏幕上的圓圈和箭頭。但是,圓圈​​和箭頭最終分開:WTF?

圓圈縮小,但箭頭移出屏幕?我不明白爲什麼。

代碼( 「#toTop」 是圓圈):

#toTop{ 
     position: fixed; 
     bottom: 10px; 
     right: 10px; 
     cursor: pointer; 
     display: none; 
    } 
    #toTop .fa { 
     margin: 5px; 
    } 
    @media(max-width:767px) { 
    #toTop{ 
     position: fixed; 
     height: 30px; 
     width: 30px; 
     bottom: 10px; 
     right: 10px; 
     cursor: pointer; 
     display: none; 
    } 

    #toTop .fa { 
     font-size: 0.5em; 
    }   
    } 
+0

你可以添加你的html嗎? – Jase

+0

@Jase:https://github.com/a-minor-threat/pf-landing-page/blob/gh-pages/index.html –

+0

酷,從一些混蛋downvote。 –

回答

0

我通過移除圓圈解決我的問題。