2016-04-12 13 views

答えて

1

だけであなたは、画面の右下にそれを得るための要素のCSS position: fixed; bottom: 0; right: 0を追加する必要があり、CSSに

position: fixed; bottom:0; right:0; 

https://jsfiddle.net/5ennwx7p/1/

0

を追加します。 right: 0は、要素が親オブジェクトの右側からの距離です。これは、この例では固定位置にしているためです。 right: 20px

また、cssの要素を簡単に選択するためのIDを追加することもできます。また、他の要素の隣に、それを取得するために、右にいくつかの量を追加する必要があります。

<img id="radioButton" src=.../play.png onclick="javascript:toggleSound();"> 

<style> 
    #radioButton { 
     position: fixed; 
     bottom: 0; 
     right: 20px; 
    } 
    #radioButton:hover { 
     opacity: 0.5; 
     filter: alpha(opacity=50); 
    } 
</style> 
関連する問題