2
我有這樣的結構:如何隱藏滾動條並在最大高度結束時顯示它?
pre {
\t word-warp: normal;
\t display: block;
\t padding: 5px 8px;
\t width: auto;
\t background-color: #eee;
\t margin-bottom: 1em;
\t max-height: 300px;
\t line-height: 1.8;
\t direction: ltr;
\t overflow: scroll;
}
<pre>
<code>
In this case both X and Y scroll-bar(s) has to be hidden
</code>
</pre>
<hr>
<pre>
<code>
In this case just Y-scroll-bar has to appears
<br>
In this case just Y-scroll-bar has to appears
<br>
In this case just Y-scroll-bar has to appears
<br>
In this case just Y-scroll-bar has to appears
<br>
</code>
</pre>
<hr>
<pre>
<code>
In this case just X-scroll-bar has to apears -------------------------------------------------------------------------------------------------------------------
</code>
</pre>
其實我試圖創造一些酷似計算器代碼法的UI。我怎樣才能做到這一點?
我猜你想改變'溢出:滾動;''到溢出:auto'? –
@NicoO WTF ...!只是!!!謝謝你的哥們。 '你通過一個小評論';-)'解決了我的問題 – stack