5

ページの右下に読み込み中の画像を配置しようとしていますが、margin-bottom 以外はすべて正常に機能します。

<div id="preload">
    <div align="right" style="margin-bottom:40px; margin-right:50px;">
        <img src="http://thc-racing.ucoz.com/design/loading.gif" alt="" />
        <br>
        <a style="color:#00ff24;"><b>Please wait while the page is loading...
        <br>If the website doesn't load within one minute please refresh your page!</b>                                                                                                 
        </a>
    </div>
</div> 

誰が何を、またはどのように機能させるのか教えてもらえますか? ありがとう

4

6 に答える 6

6

これは、マージンとパディングの性質です。マージンは要素の外側にあるため、別の要素が続く場合を除き、レンダリングされません。親で 1px の下部パディングを使用できます。レンダリングをトリガーする必要があります。

于 2013-08-20T18:52:43.337 に答える
3

絶対位置を割り当て、下と右のプロパティを使用する必要があります。

http://jsfiddle.net/7yrUy/

<div id="preload">
<div align="right" style="position:absolute; bottom:40px; right:50px">
    <img src="http://thc-racing.ucoz.com/design/loading.gif" alt="" />
    <br><a style="color:#00ff24;"><b>Please wait while the page is loading...<br>If the website doesn't load within one minute please refresh your page!</b></a>
</div>

于 2013-08-20T18:53:03.367 に答える
2

ページの右下に表示したい場合は、次の css を使用してください。

.yourClass {
    position: absolute;
    right: 0;
    bottom: 0;
}

ピクセル数を変更したい場合は、0を必要なものに変更します

于 2013-08-20T18:50:11.817 に答える