目錄
一號標題
二號標題
三號標題
四號標題
五號標題
六號標題
財富雜誌:谷歌為何不會盛極而衰
遭遇潛在問題
將繼續壟斷搜尋
沁園春·長沙
首頁 web前端 html教學 HTML網頁各種字體格式的細節修飾_HTML/Xhtml_網頁製作

HTML網頁各種字體格式的細節修飾_HTML/Xhtml_網頁製作

May 16, 2016 pm 04:43 PM
br html 字體 標籤 格式 細節 網頁


本節從文字的細節修飾入手,讓讀者能掌握HTML的各種字體格式的變化,並製作出更專業的網頁。
4.2 文字的多樣化修飾
上一節學習了大塊段落的各種設置,對於文字本身修飾似乎更加吸引人。本節從文字的細節修飾入手,讓讀者能掌握HTML的各種字體格式的變化,並製作出更專業的網頁。
4.2.1 文字樣式設定的基本標籤—
設定字體樣式的基本標籤是,被其包含的文字為樣式作用區。在初學者的HTML程式碼編寫中,容易被多重嵌套,如文字。還有一種情況是標籤嵌套錯位,如

文字

。為了規範程式碼的編寫,避免不必要的錯誤,讀者在初學時一定要謹慎。
4.2.2 設定文字的顏色
color是標籤的屬性之一,用來設定文字顏色。在D:web目錄下建立網頁文件,命名為font_color.htm,編寫程式碼4.7所示。
程式碼4.7 字型顏色的設定:font_color.htm


字型顏色的設定


淺紅文字:HTML學習的本質就是該是什麼就用什麼

深紅色文字:HTML學習的本質就是該是什麼就用什麼

淺綠色文字:HTML學習的本質就是該是什麼就用什麼

深綠色文字:HTML學習的本質就是該是什麼就用什麼

淺藍色文字:HTML學習的本質就是該是什麼就用什麼

深藍色文字:HTML學習的本質就是該是什麼就用什麼

淺黃色文字:HTML學習的本質就是該是什麼就用什麼

深黃文字:HTML學習的本質就是該是什麼就用什麼

淺青色文字:HTML學習的本質就是該是什麼就用什麼

深青色文字:HTML學習的本質就是該是什麼就用什麼

淺紫色文字:HTML學習的本質就是該是什麼就用什麼

深紫文字:HTML學習的本質就是該是什麼就用什麼



在瀏覽器網址列輸入http://localhost/font_color.htm,瀏覽效果如圖4.7所示。

圖4.7 字體顏色的設置
讀者不但可以從程式碼4.7學到color屬性在font標籤中的用法,還可以熟悉各種顏色的表示方法。
4.2.3 設定文字的尺寸
size也是標籤的屬性,用來設定文字大小。 size的值為1-7,預設為3。我們可以size 屬性值之前加上「+」、「-」字符,來指定相對於字號初始值的增量或減量。在D:web目錄下建立網頁文件,命名為font_size.htm,編寫程式碼4.8所示。
代碼4.8 字體尺寸的設定:font_size.htm


字型尺寸的設定


size為1:HTML學習

size為2:HTML學習

size為3:HTML學習

size為4:HTML學習

size為5:HTML學習

size為6:HTML學習

size為7:HTML學習



在瀏覽器網址列輸入http://localhost/font_size.htm,瀏覽效果如圖4.8所示。

圖4.8 字體尺寸的設置
讀者可嘗試在size值前面加上「+」、「-」字符,更靈活地設定文字尺寸。
4.2.4 設定文字的字體
face也是標籤的屬性,用來設定文字字體(字體)。 HTML網頁中顯示的字體從瀏覽端的系統中調用,所以為了保持字體一致,建議採用宋體,HTML頁面也是預設採用宋體。在D:web目錄下建立網頁文件,命名為font_face.htm,編寫程式碼4.9所示。
代碼4.9 字型字體的設定:font_face.htm


字型的設定


字型為宋體:沁園春·長沙-毛澤東

字型為楷體:沁園春·長沙-毛澤東

字型為黑體:沁園春·長沙-毛澤東

字型為隸書:沁園春·長沙-毛澤東


在瀏覽器網址列輸入http://localhost/font_face.htm,瀏覽效果如圖4.9所示。

圖4.9 字體字體的設置
筆者把被修改字體部分的文字尺寸設定為5號,方便讀者查看。
4.2.5 使文字傾斜
以雙標籤可使被作用文字傾斜,達到特殊的效果,例如文章的日期。 稱為強調標籤,也是斜體,目前使用比標籤更頻繁,其編寫方法如下:
這是斜體文字
這也是斜體文字
4.2.6 使文字加粗
用雙標籤可使被作用文字加粗,是文字更加醒目,例如文章的標題部分。 稱為特別強調標籤,也是文字加粗,目前使用比標籤更頻繁,其編寫方法如下:
這是粗體文字
這也是粗體文字
4.2.7 給文字加底線
用雙標籤可添加底線到被作用文字。以下為文字傾斜、加粗和底線的綜合範例。在D:web目錄下建立網頁文件,命名為font_style.htm,編寫程式碼4.10所示。
代碼4.10 文字修飾的設定:font_style.htm


字體修飾的設定


斜體:沁園春·長沙-毛澤東

加粗體:沁園春·長沙-毛澤東

底線:沁園春·長沙-毛澤東

斜體 加粗體 底線:沁園春·長沙-毛澤東



在瀏覽器網址列輸入http://localhost/font_style.htm,瀏覽效果如圖4.10所示。

圖4.10 字體修飾的設置
筆者把內的所有文字尺寸設定為5號,方便讀者查看。
— 注意:當多個標籤包含同一塊文字時,其包含順序不能錯位。
4.2.8 多種標題樣式的使用
網頁的文章中,為了凸顯標題的重要性,標題的樣式比較特殊。 HTML技術保護了一套針對標題的樣式標籤,分別為雙標籤

,文字尺寸從大到小代表不同等級的標題。標題標籤有一個特點,獨佔一行、文字加粗、文字居中。這樣,在設定標題的時候就很輕鬆了,而且可設多層標題。在D:web目錄下建立網頁文件,命名為font_h.htm,編寫程式碼4.11所示。
代碼4.11 標題的設定:font_h.htm


標題的設定


一號標題


二號標題


三號標題


四號標題


五號標題

六號標題

財富雜誌:谷歌為何不會盛極而衰


   

遭遇潛在問題


  

    一些業內人士認為,長期壟斷網路搜尋和廣告市場Google可能會盛極而衰。 ……與此同時,Google近日推出的多項新計劃,例如開放手機聯盟、社交網站通用平台OpenSocial、以及可能投資數十億美元競購無線頻段,也遭到了廣泛的質疑。
  

將繼續壟斷搜尋


  

    最近有一些文章稱,如果出現更好的搜尋引擎,人們會毫不猶豫地放棄Google。但是,即使真有更好的搜尋引擎出現,Google仍然可以在一段時間內屹立不倒。 ……在這種情況下,網站速度往往會成為決定勝負的關鍵。




在瀏覽器網址列輸入http://localhost/font_h.htm,瀏覽效果如圖4.11所示。

圖4.11 標題的設置
4.2.9 學會處理網頁中的特殊字元
在HTML中,有些字元有特殊意義,例如「」是標籤的左括號和右括號,而標籤是控制HTML顯示的,標籤本身只能被瀏覽器解析,並不能在頁面中顯示。那麼,該怎麼在HTML中顯示「」呢? HTML規定了一些特殊字元的寫法,以便在網頁中顯示,如表4.1所示。
表4.1 HTML中的特殊字符

特殊符號
HTML程式碼
特殊符號
HTML程式碼
™(商標符號)

>
>
®(註冊符號)
®
「」(英文半角)
"
×
×
§
§
©(版權符號)
©
在D:web目錄下建立網頁文件,命名為string.htm,編寫string.htm程式碼如程式碼4.12所示。
代碼4.12 特殊字元的設定:string.htm


特殊字元的設定



標籤的顯示方法:

引號的顯示方法:"英文半角雙引號"

商標的顯示方法:™

註冊符號的顯示方法:®

版權符號的顯示方法:©

顯示§

顯示×



在瀏覽器網址列輸入http://localhost/string.htm,瀏覽效果如圖4.12所示。

圖4.12 特殊字元的設置
— 說明:單獨顯示符號&必須用代碼&。
4.2.10 如何更方便地忽略瀏覽器對部分HTML的解析
如果在網頁中作一個類似本書的HTML程式碼範例,恐怕得把所有的轉換成,顯得比較麻煩。 HTML程式碼中的和<xmp></xmp>可以輕鬆解決這個問題。 <br><plaintext>是單標籤,它插入到HTML程式碼中時,其後面的所有HTML標籤全部失效,即瀏覽器對<plaintext>後面所有的HTML標籤不作解析,直接在頁面上顯示。 <br><xmp></xmp>是雙標籤,它只使其包含的內容中的標籤失效,<xmp></xmp>的使用更為普遍。在D:web目錄下建立網頁文件,命名為html.htm,編寫程式碼4.13所示。 <br>代碼4.13 忽略標籤的設定:html.htm <br> <br> <br> <title>忽略標籤的設定</title> <br> <br> <br><h2 id="沁園春-長沙">沁園春·長沙</h2> <br><xmp>獨立寒秋,<strong>湘江北去</strong>,橘子洲頭。 <br>看萬山紅遍,層林盡染; <br>漫江碧透,<u>百舸爭流。 </u> <br></xmp> <br>鷹擊長空,<strong>魚翔淺底,</strong> <br>萬類霜天競自由。 <br>悵寥廓,<u>問蒼茫大地</u>,誰主沉浮? <br> <br><plaintext> <br>攜來百姓曾遊,<br>憶往昔嶸嶸歲月稠。 <br> 恰同學少年,風華正茂; <br> 書生意氣,揮斥方遒。 <br> 指點江山,激揚文字, <br> 糞土當年萬戶侯。 <br> 曾經記否,<strong>到中流擊水</strong>,浪遏飛舟! <br> <br> <br>在瀏覽器網址列輸入http://localhost/string.htm,瀏覽效果如圖4.13所示。 <br><img src="/static/imghw/default1.png" data-src="http://files.jb51.net/file_images/web/2009422058213177807.jpg" class="lazy" style="max-width:90%" alt="" style="max-width:90%"> <br>圖4.13 忽略標籤的設置 <br><strong>4.2.11 其他文字修飾方法</strong> <br>為了滿足不同領域的需要,HTML還有其他修飾文字的標籤。比較常用的有上標格式標籤和下標格式標籤。某些場合甚至要用到刪除效果,即可用HTML的中劃線標籤。 <br>— 上標格式標籤為雙標籤<sup></sup>,多用於數學指數的表示,例如某個數的平方或立方。 <br>— 下標格式標籤為雙標籤<sub></sub>,多用於註釋,以及數學的底數表示。 <br>— 中劃線標籤為雙標籤<strike></strike>,多用於刪除效果。 <br>在D:web目錄下建立網頁文件,命名為other.htm,編寫程式碼如程式碼4.14所示。 <br>代碼4.14 其他修飾標籤的設定:other.htm <br> <br> <br> <title>其他修飾標籤的設定</title> <br> <br> <br><font size="5"> <br>沁園春<sup>長沙</sup>! <br> <br>數學指數的表示:2<sup>3</sup>=8、100<sup>2</sup>=10000<br><hr> <br>沁園春<sub>長沙</sub>! <br> <br>數學底數的表示:log<sub>3</sub>81=4、log<sub>5</sub>125=3<br><hr> <br>刪除效果:<strike>我被刪除了</strike> <br></font> <br> <br> <br>在瀏覽器網址列輸入http://localhost/other.htm,瀏覽效果如圖4.14所示。 <br><img src="/static/imghw/default1.png" data-src="http://files.jb51.net/file_images/web/2009422058217877808.jpg" class="lazy" style="max-width:90%" alt="" style="max-width:90%"> <br>圖4.14 其他修飾標籤的設置</plaintext></plaintext></plaintext></plaintext> </div> </div> <div class="wzconShengming_sp"> <div class="bzsmdiv_sp">本網站聲明</div> <div>本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn</div> </div> </div> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5902227090019525" data-ad-slot="2507867629"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div class="AI_ToolDetails_main4sR"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5902227090019525" data-ad-slot="3653428331" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>熱門文章</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796780570.html" title="R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 週前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796780641.html" title="R.E.P.O.最佳圖形設置" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O.最佳圖形設置</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 週前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796785841.html" title="刺客信條陰影:貝殼謎語解決方案" class="phpgenera_Details_mainR4_bottom_title">刺客信條陰影:貝殼謎語解決方案</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 週前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796780520.html" title="R.E.P.O.如果您聽不到任何人,如何修復音頻" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O.如果您聽不到任何人,如何修復音頻</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 週前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796779766.html" title="WWE 2K25:如何解鎖Myrise中的所有內容" class="phpgenera_Details_mainR4_bottom_title">WWE 2K25:如何解鎖Myrise中的所有內容</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 個月前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/zh-tw/article.html">顯示更多</a> </div> </div> </div> --> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>熱AI工具</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title"> <h3>Undresser.AI Undress</h3> </a> <p>人工智慧驅動的應用程序,用於創建逼真的裸體照片</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title"> <h3>AI Clothes Remover</h3> </a> <p>用於從照片中去除衣服的線上人工智慧工具。</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title"> <h3>Undress AI Tool</h3> </a> <p>免費脫衣圖片</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title"> <h3>Clothoff.io</h3> </a> <p>AI脫衣器</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/ai/ai-hentai-generator" title="AI Hentai Generator" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173405034393877.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Hentai Generator" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/ai/ai-hentai-generator" title="AI Hentai Generator" class="phpmain_tab2_mids_title"> <h3>AI Hentai Generator</h3> </a> <p>免費產生 AI 無盡。</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/zh-tw/ai">顯示更多</a> </div> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>熱門文章</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796780570.html" title="R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 週前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796780641.html" title="R.E.P.O.最佳圖形設置" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O.最佳圖形設置</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 週前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796785841.html" title="刺客信條陰影:貝殼謎語解決方案" class="phpgenera_Details_mainR4_bottom_title">刺客信條陰影:貝殼謎語解決方案</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 週前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796780520.html" title="R.E.P.O.如果您聽不到任何人,如何修復音頻" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O.如果您聽不到任何人,如何修復音頻</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>4 週前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796779766.html" title="WWE 2K25:如何解鎖Myrise中的所有內容" class="phpgenera_Details_mainR4_bottom_title">WWE 2K25:如何解鎖Myrise中的所有內容</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 個月前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/zh-tw/article.html">顯示更多</a> </div> </div> </div> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>熱工具</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/92" title="記事本++7.3.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="記事本++7.3.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/92" title="記事本++7.3.1" class="phpmain_tab2_mids_title"> <h3>記事本++7.3.1</h3> </a> <p>好用且免費的程式碼編輯器</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/93" title="SublimeText3漢化版" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3漢化版" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/93" title="SublimeText3漢化版" class="phpmain_tab2_mids_title"> <h3>SublimeText3漢化版</h3> </a> <p>中文版,非常好用</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/121" title="禪工作室 13.0.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="禪工作室 13.0.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/121" title="禪工作室 13.0.1" class="phpmain_tab2_mids_title"> <h3>禪工作室 13.0.1</h3> </a> <p>強大的PHP整合開發環境</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Dreamweaver CS6" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title"> <h3>Dreamweaver CS6</h3> </a> <p>視覺化網頁開發工具</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/500" title="SublimeText3 Mac版" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac版" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/zh-tw/toolset/development-tools/500" title="SublimeText3 Mac版" class="phpmain_tab2_mids_title"> <h3>SublimeText3 Mac版</h3> </a> <p>神級程式碼編輯軟體(SublimeText3)</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/zh-tw/ai">顯示更多</a> </div> </div> </div> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>熱門話題</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/gmailyxdlrkzn" title="gmail信箱登陸入口在哪裡" class="phpgenera_Details_mainR4_bottom_title">gmail信箱登陸入口在哪裡</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>7504</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>15</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/cakephp-tutor" title="CakePHP 教程" class="phpgenera_Details_mainR4_bottom_title">CakePHP 教程</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1378</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>52</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/steamdzhmcssmgs" title="steam的賬戶名稱是什麼格式" class="phpgenera_Details_mainR4_bottom_title">steam的賬戶名稱是什麼格式</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>78</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>11</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/winactivationkeyper" title="win11激活密鑰永久" class="phpgenera_Details_mainR4_bottom_title">win11激活密鑰永久</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>52</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>19</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/newyorktimesdailybrief" title="NYT連接提示和答案" class="phpgenera_Details_mainR4_bottom_title">NYT連接提示和答案</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>19</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>54</span> </div> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/zh-tw/faq/zt">顯示更多</a> </div> </div> </div> </div> </div> <div class="Article_Details_main2"> <div class="phpgenera_Details_mainL4"> <div class="phpmain1_2_top"> <a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img src="/static/imghw/index2_title2.png" alt="" /></a> </div> <div class="phpgenera_Details_mainL4_info"> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/zh-tw/faq/1796600245.html" title="HTML 中的表格邊框" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202409/04/2024090416492486715.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="HTML 中的表格邊框" /> </a> <a href="https://www.php.cn/zh-tw/faq/1796600245.html" title="HTML 中的表格邊框" class="phphistorical_Version2_mids_title">HTML 中的表格邊框</a> <span class="Articlelist_txts_time">Sep 04, 2024 pm 04:49 PM</span> <p class="Articlelist_txts_p">HTML 表格邊框指南。在這裡,我們以 HTML 中的表格邊框為例,討論定義表格邊框的多種方法。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/zh-tw/faq/1796600238.html" title="HTML 左邊距" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202409/04/2024090416482056439.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="HTML 左邊距" /> </a> <a href="https://www.php.cn/zh-tw/faq/1796600238.html" title="HTML 左邊距" class="phphistorical_Version2_mids_title">HTML 左邊距</a> <span class="Articlelist_txts_time">Sep 04, 2024 pm 04:48 PM</span> <p class="Articlelist_txts_p">HTML 左邊距指南。在這裡,我們討論 HTML margin-left 的簡要概述及其範例及其程式碼實作。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/zh-tw/faq/1796600244.html" title="HTML 中的巢狀表" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202409/04/2024090416491283996.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="HTML 中的巢狀表" /> </a> <a href="https://www.php.cn/zh-tw/faq/1796600244.html" title="HTML 中的巢狀表" class="phphistorical_Version2_mids_title">HTML 中的巢狀表</a> <span class="Articlelist_txts_time">Sep 04, 2024 pm 04:49 PM</span> <p class="Articlelist_txts_p">這是 HTML 中巢狀表的指南。這裡我們討論如何在表中建立表格以及對應的範例。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/zh-tw/faq/1796600271.html" title="HTML 表格佈局" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202409/04/2024090416543391948.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="HTML 表格佈局" /> </a> <a href="https://www.php.cn/zh-tw/faq/1796600271.html" title="HTML 表格佈局" class="phphistorical_Version2_mids_title">HTML 表格佈局</a> <span class="Articlelist_txts_time">Sep 04, 2024 pm 04:54 PM</span> <p class="Articlelist_txts_p">HTML 表格佈局指南。在這裡,我們詳細討論 HTML 表格佈局的值以及範例和輸出。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/zh-tw/faq/1796600269.html" title="HTML 輸入佔位符" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202409/04/2024090416542577781.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="HTML 輸入佔位符" /> </a> <a href="https://www.php.cn/zh-tw/faq/1796600269.html" title="HTML 輸入佔位符" class="phphistorical_Version2_mids_title">HTML 輸入佔位符</a> <span class="Articlelist_txts_time">Sep 04, 2024 pm 04:54 PM</span> <p class="Articlelist_txts_p">HTML 輸入佔位符指南。在這裡,我們討論 HTML 輸入佔位符的範例以及程式碼和輸出。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/zh-tw/faq/1796600210.html" title="HTML 有序列表" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202409/04/2024090416432927533.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="HTML 有序列表" /> </a> <a href="https://www.php.cn/zh-tw/faq/1796600210.html" title="HTML 有序列表" class="phphistorical_Version2_mids_title">HTML 有序列表</a> <span class="Articlelist_txts_time">Sep 04, 2024 pm 04:43 PM</span> <p class="Articlelist_txts_p">HTML 有序列表指南。在這裡我們也分別討論了 HTML 有序列表和類型的介紹以及它們的範例</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/zh-tw/faq/1796600227.html" title="在 HTML 中移動文字" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202409/04/2024090416455153019.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="在 HTML 中移動文字" /> </a> <a href="https://www.php.cn/zh-tw/faq/1796600227.html" title="在 HTML 中移動文字" class="phphistorical_Version2_mids_title">在 HTML 中移動文字</a> <span class="Articlelist_txts_time">Sep 04, 2024 pm 04:45 PM</span> <p class="Articlelist_txts_p">HTML 中的文字移動指南。在這裡我們討論一下marquee標籤如何使用語法和實作範例。</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/zh-tw/faq/1796600246.html" title="HTML onclick 按鈕" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/202409/04/2024090416493797970.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="HTML onclick 按鈕" /> </a> <a href="https://www.php.cn/zh-tw/faq/1796600246.html" title="HTML onclick 按鈕" class="phphistorical_Version2_mids_title">HTML onclick 按鈕</a> <span class="Articlelist_txts_time">Sep 04, 2024 pm 04:49 PM</span> <p class="Articlelist_txts_p">HTML onclick 按鈕指南。這裡我們分別討論它們的介紹、工作原理、範例以及各個事件中的onclick事件。</p> </div> </div> <a href="https://www.php.cn/zh-tw/web-designer.html" class="phpgenera_Details_mainL4_botton"> <span>See all articles</span> <img src="/static/imghw/down_right.png" alt="" /> </a> </div> </div> </div> </main> <footer> <div class="footer"> <div class="footertop"> <img src="/static/imghw/logo.png" alt=""> <p>公益線上PHP培訓,幫助PHP學習者快速成長!</p> </div> <div class="footermid"> <a href="https://www.php.cn/zh-tw/about/us.html">關於我們</a> <a href="https://www.php.cn/zh-tw/about/disclaimer.html">免責聲明</a> <a href="https://www.php.cn/zh-tw/update/article_0_1.html">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1744668001"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' /> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function () { var u = "https://tongji.php.cn/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '9']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); })(); </script> <script> // top layui.use(function () { var util = layui.util; util.fixbar({ on: { mouseenter: function (type) { layer.tips(type, this, { tips: 4, fixed: true, }); }, mouseleave: function (type) { layer.closeAll("tips"); }, }, }); }); document.addEventListener("DOMContentLoaded", (event) => { // 定义一个函数来处理滚动链接的点击事件 function setupScrollLink(scrollLinkId, targetElementId) { const scrollLink = document.getElementById(scrollLinkId); const targetElement = document.getElementById(targetElementId); if (scrollLink && targetElement) { scrollLink.addEventListener("click", (e) => { e.preventDefault(); // 阻止默认链接行为 targetElement.scrollIntoView({ behavior: "smooth" }); // 平滑滚动到目标元素 }); } else { console.warn( `Either scroll link with ID '${scrollLinkId}' or target element with ID '${targetElementId}' not found.` ); } } // 使用该函数设置多个滚动链接 setupScrollLink("Article_Details_main1L2s_1", "article_main_title1"); setupScrollLink("Article_Details_main1L2s_2", "article_main_title2"); setupScrollLink("Article_Details_main1L2s_3", "article_main_title3"); setupScrollLink("Article_Details_main1L2s_4", "article_main_title4"); setupScrollLink("Article_Details_main1L2s_5", "article_main_title5"); setupScrollLink("Article_Details_main1L2s_6", "article_main_title6"); // 可以继续添加更多的滚动链接设置 }); window.addEventListener("scroll", function () { var fixedElement = document.getElementById("Article_Details_main1Lmain"); var scrollTop = window.scrollY || document.documentElement.scrollTop; // 兼容不同浏览器 var clientHeight = window.innerHeight || document.documentElement.clientHeight; // 视口高度 var scrollHeight = document.documentElement.scrollHeight; // 页面总高度 // 计算距离底部的距离 var distanceToBottom = scrollHeight - scrollTop - clientHeight; // 当距离底部小于或等于300px时,取消固定定位 if (distanceToBottom <= 980) { fixedElement.classList.remove("Article_Details_main1Lmain"); fixedElement.classList.add("Article_Details_main1Lmain_relative"); } else { // 否则,保持固定定位 fixedElement.classList.remove("Article_Details_main1Lmain_relative"); fixedElement.classList.add("Article_Details_main1Lmain"); } }); </script> </body> </html>