Loading...

使用CSS 讓ul li 橫向水平

Temperature: 0 °C

Mark ChangMark Chang
author_tools

好吧,其實這個css常在用,但我每次都沒特別紀錄,然後每次又忘記然後又要Google。

其實主要就是使用 CSS 的 display inline 的語法。

就這麼簡單。

以下範例:

<div id="topmenu">
選單橫向水平呈現
<ul>
 <li>這裡是選單01</li>
 <li>這裡是選單02</li>
<li>這裡是選單03</li>
</ul>
</div>

然後css的寫法如下:
<style type="text/css">
<!--
#topmenu ul li {
 display:inline;
}
-->
</style>

以上紀錄~

#故事  #css  #ul li橫向水平  #display inline  
https://innstory.com/story-使用CSS_讓ul_li_橫向水平-2679
CSS

Prev
 htaccess設定網站預設首頁次序

Next
設定Postfix使用SMTP_Server當作relay主機 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

點選檔案下載卻直接執行開啟

點選檔案下載卻直接執行開啟

遇到一個情況。 使用者開啟瀏覽器點選某個連結檔案時,不會執行下載而是直接開啟檔案。 原本如果只是圖片...

PDO常用方法

pexelsphoto555.jpeg PDO::query() 主要用於有記錄結果返回的操作(PD...

分享 不得不用的15個神奇熱鍵

分享 不得不用的15個神奇熱...

好吧~我學到了,看看有沒有機會用上。 我承認切換桌面跟把視窗快速隱藏的熱鍵是蠻好用的。 不想被發現的...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format