0

漢字を横書きで表示するのに苦労しています。このcssスタイルシートを使用していくつかの組み合わせを試しました。

私のCSS:

.myborder{
    border: 2px solid;border-top-left-radius: 50px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 50px;
    border-bottom-left-radius: 2px;
    box-shadow: 9px 9px 15px #000000;
}

.myborder .h1{
    width: 30px;
    display: compact;
    -webkit-margin-before: 1em;
    -webkit-margin-after: 1em;
    -webkit-margin-start: 0px;
    -webkit-margin-end: 0px;
    text-align: left;
    padding-left: 20px;
    font-size: 38.5px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 0;
    line-height: 1;
    word-spacing: -1;
    font-family: inherit;
    color: inherit;
    text-rendering: optimizelegibility;
}

私のhtmlコード:

<div class = "myborder">
   <div class="h1">国务院公布了房&lt;/div>
</div>

displayスタイル、、line-heightなどを変更してみましword-spacingたが、文字が横に印刷されませんでした。

何故ですか?

4

1 に答える 1

2

これは、幅が30pxしかないdivを作成しているためです。したがって、テキストは次の行に移動する以外に選択肢はありません。「幅:30px」を削除します。私はそれを試しただけで大丈夫でした。

于 2013-03-06T02:42:20.483 に答える