-4

line-height を 0 に変更してみました。これにより、間隔がかなり小さくなりましたが、各行の間にまだ約 1 cm あります....
HTML を htmledit(DOT)squarefree(DOT)com/ に書いたとき非常に小さく見えました http://i.stack.imgur.com/NsBG5.png
が、ブログに載せて保存すると、スペースが大幅に拡大されました...
http://i.stack.imgur.com/utZ6m .png

入力していたコードは
<p <span title="Made by [name]" style="background-color:black; border: double 10px #FF0000; text-align: center; font-size: 50px; font-family: arial; color: #FF0000; text-shadow: 5px 5px 4px #8A0808;">Text<br /><span style="text-align: center; font-size: 25px; font-family: arial; color: #8A0808; text-shadow: 0px 0px 0px; line-height: 0;">text<br /><span style="text-align: center; font-size: 25px; font-family: arial; color: #8A0808; text-shadow: 0px 0px; line-height: 0;">text<br /><span style="text-align: center; font-size: 25px; font-family: arial; color: #8A0808; text-shadow: 0px 0px; line-height: 0">text<br /><span style="text-align: center; font-size: 25px; font-family: arial; color: #8A0808; text-shadow: 0px 0px; line-height: 0">text<br /><span style="text-align: center; font-size: 25px; font-family: arial; color: #8A0808; text-shadow: 0px 0px; line-height: 0">text<br /><span style="line-height: 0"><br /><span style="text-align: center; font-size: 15px; font-family: georgia; color: #FF0000; text-shadow: 0px 0px; line-height: 0"> © text</span style="line-height: 0" p>

4

1 に答える 1

3

あなたのコードはかなり面倒です。ほとんどのタグは閉じられていません。

<tag> gets closed with </tag>
<p>some text for a paragraph</p>
<span style="some style">some text to be displayed in that style</span>

<input>(やなどの自己終了タグは除きます<img>

要素を他の要素の内部に配置する場合 (「ネスト」と呼ばれます)、それらを適切に閉じる必要があります (上記のように) が、開いた順序とは逆になります。

<p>this is a paragraph
    <span>this is a span inside the paragraph. it gets closed before the paragraph</span>
   the span is now closed, and the paragraph can be closed
</p>

しかし、あなたの場合、ネストは必要ありません。あなたが望むことをするこの例を見てください。そこからのHTMLは次のとおりです。

<div style="background-color:black; border: double 10px #FF0000; text-align: center; font-size: 25px; font-family: arial; color: #FF0000; text-shadow: 5px 5px 4px #8A0808;">
    <!-- Text inside these special braces is called a comment. It isn't displayed on the page -->
    <!-- Beginning of <p> element -->
    <!-- Change the value of "line-height" here to space lines differently -->
    <p style="line-height:25px">
        text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
    </p>
    <!-- End of <p> element -->

    <!-- The following "text" is in a separate <p> element, so it will be displayed by itself -->

    <p>
        text
    </p>
</div>
于 2013-07-28T02:57:26.847 に答える