搜尋
首頁web前端html教學HTML網頁各種字體格式的細節修飾_HTML/Xhtml_網頁製作


本節從文字的細節修飾入手,讓讀者能掌握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/imghwm/default1.png" data-src="http://files.jb51.net/file_images/web/2009422058213177807.jpg?x-oss-process=image/resize,p_40" 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/imghwm/default1.png" data-src="http://files.jb51.net/file_images/web/2009422058217877808.jpg?x-oss-process=image/resize,p_40" class="lazy" style="max-width:90%" alt="" style="max-width:90%"> <br>圖4.14 其他修飾標籤的設置</plaintext></plaintext></plaintext></plaintext></div><div class="wzconShengming_sp"><div class="bzsmdiv_sp">陳述</div><div>本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn</div></div></div><div class="phpgenera_Details_mainL4"><div class="phpmain1_2_top"><a href="javascript:void(0);" class="phpmain1_2_top_title">相關文章<img class="lazy" data-src="/static/imghwm/index2_title2.png" src="/static/imghw/default1.png" alt="" /></a></div><div class="phpgenera_Details_mainL4_info"><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh-tw/faq/1796795191.html" title="從文本到網站:HTML的力量" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174447404295304.jpg?x-oss-process=image/resize,p_40" alt="從文本到網站:HTML的力量" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh-tw/faq/1796795191.html" title="從文本到網站:HTML的力量" class="phphistorical_Version2_mids_title">從文本到網站:HTML的力量</a><span class="Articlelist_txts_time">Apr 13, 2025 am 12:07 AM</span><p class="Articlelist_txts_p">HTML是一種用於構建網頁的語言,通過標籤和屬性定義網頁結構和內容。 1)HTML通過標籤組織文檔結構,如、。 2)瀏覽器解析HTML構建DOM並渲染網頁。 3)HTML5的新特性如、、增強了多媒體功能。 4)常見錯誤包括標籤未閉合和屬性值未加引號。 5)優化建議包括使用語義化標籤和減少文件大小。</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh-tw/faq/1796794693.html" title="了解HTML,CSS和JavaScript:初學者指南" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174438733162787.jpg?x-oss-process=image/resize,p_40" alt="了解HTML,CSS和JavaScript:初學者指南" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh-tw/faq/1796794693.html" title="了解HTML,CSS和JavaScript:初學者指南" class="phphistorical_Version2_mids_title">了解HTML,CSS和JavaScript:初學者指南</a><span class="Articlelist_txts_time">Apr 12, 2025 am 12:02 AM</span><p class="Articlelist_txts_p">WebDevelovermentReliesonHtml,CSS和JavaScript:1)HTMLStructuresContent,2)CSSStyleSIT和3)JavaScriptAddSstractivity,形成thebasisofmodernWebemodernWebExexperiences。</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh-tw/faq/1796794180.html" title="HTML的角色:構建Web內容" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174430155217186.jpg?x-oss-process=image/resize,p_40" alt="HTML的角色:構建Web內容" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh-tw/faq/1796794180.html" title="HTML的角色:構建Web內容" class="phphistorical_Version2_mids_title">HTML的角色:構建Web內容</a><span class="Articlelist_txts_time">Apr 11, 2025 am 12:12 AM</span><p class="Articlelist_txts_p">HTML的作用是通過標籤和屬性定義網頁的結構和內容。 1.HTML通過到、等標籤組織內容,使其易於閱讀和理解。 2.使用語義化標籤如、等增強可訪問性和SEO。 3.優化HTML代碼可以提高網頁加載速度和用戶體驗。</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh-tw/faq/1796793634.html" title="HTML和代碼:仔細觀察術語" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174424853215422.jpg?x-oss-process=image/resize,p_40" alt="HTML和代碼:仔細觀察術語" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh-tw/faq/1796793634.html" title="HTML和代碼:仔細觀察術語" class="phphistorical_Version2_mids_title">HTML和代碼:仔細觀察術語</a><span class="Articlelist_txts_time">Apr 10, 2025 am 09:28 AM</span><p class="Articlelist_txts_p">htmlisaspecifictypefodyfocusedonstructuringwebcontent,而“代碼” badlyLyCludEslanguagesLikeLikejavascriptandPytyPythonForFunctionality.1)htmldefineswebpagertuctureduseTags.2)“代碼”代碼“ code” code code code codeSpassSesseseseseseseseAwiderRangeLangeLangeforLageforLogageforLogicIctInterract</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh-tw/faq/1796793129.html" title="HTML,CSS和JavaScript:Web開發人員的基本工具" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174412873346901.jpg?x-oss-process=image/resize,p_40" alt="HTML,CSS和JavaScript:Web開發人員的基本工具" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh-tw/faq/1796793129.html" title="HTML,CSS和JavaScript:Web開發人員的基本工具" class="phphistorical_Version2_mids_title">HTML,CSS和JavaScript:Web開發人員的基本工具</a><span class="Articlelist_txts_time">Apr 09, 2025 am 12:12 AM</span><p class="Articlelist_txts_p">HTML、CSS和JavaScript是Web開發的三大支柱。 1.HTML定義網頁結構,使用標籤如、等。 2.CSS控製網頁樣式,使用選擇器和屬性如color、font-size等。 3.JavaScript實現動態效果和交互,通過事件監聽和DOM操作。</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh-tw/faq/1796792987.html" title="HTML,CSS和JavaScript的角色:核心職責" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174411031220217.jpg?x-oss-process=image/resize,p_40" alt="HTML,CSS和JavaScript的角色:核心職責" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh-tw/faq/1796792987.html" title="HTML,CSS和JavaScript的角色:核心職責" class="phphistorical_Version2_mids_title">HTML,CSS和JavaScript的角色:核心職責</a><span class="Articlelist_txts_time">Apr 08, 2025 pm 07:05 PM</span><p class="Articlelist_txts_p">HTML定義網頁結構,CSS負責樣式和佈局,JavaScript賦予動態交互。三者在網頁開發中各司其職,共同構建豐富多彩的網站。</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh-tw/faq/1796791823.html" title="HTML容易為初學者學習嗎?" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174395586298618.jpg?x-oss-process=image/resize,p_40" alt="HTML容易為初學者學習嗎?" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh-tw/faq/1796791823.html" title="HTML容易為初學者學習嗎?" class="phphistorical_Version2_mids_title">HTML容易為初學者學習嗎?</a><span class="Articlelist_txts_time">Apr 07, 2025 am 12:11 AM</span><p class="Articlelist_txts_p">HTML適合初學者學習,因為它簡單易學且能快速看到成果。 1)HTML的學習曲線平緩,易於上手。 2)只需掌握基本標籤即可開始創建網頁。 3)靈活性高,可與CSS和JavaScript結合使用。 4)豐富的學習資源和現代工具支持學習過程。</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh-tw/faq/1796791144.html" title="HTML中起始標籤的示例是什麼?" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/article/001/253/068/174386905283883.jpg?x-oss-process=image/resize,p_40" alt="HTML中起始標籤的示例是什麼?" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh-tw/faq/1796791144.html" title="HTML中起始標籤的示例是什麼?" class="phphistorical_Version2_mids_title">HTML中起始標籤的示例是什麼?</a><span class="Articlelist_txts_time">Apr 06, 2025 am 12:04 AM</span><p class="Articlelist_txts_p">AnexampleOfAstartingTaginHtmlis,beginSaparagraph.startingTagSareEssentialInhtmlastheyInitiateEllements,defiteTheeTheErtypes,andarecrucialforsstructuringwebpages wepages webpages andConstructingthedom。</p></div></div><a href="https://m.php.cn/zh-tw/web-designer.html" class="phpgenera_Details_mainL4_botton"><span>See all articles</span><img class="lazy" data-src="/static/imghwm/down_right.png" src="/static/imghw/default1.png" alt="" /></a></div><ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-6t+ed+2i-1n-4w" data-ad-client="ca-pub-5902227090019525" data-ad-slot="8966999616"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script><div class="AI_ToolDetails_main4sR"><div class="phpgenera_Details_mainR3"><div class="phpmain1_4R_readrank"><div class="phpmain1_4R_readrank_top"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="/static/imghwm/hottools2.png" src="/static/imghw/default1.png" alt="" /><h2>熱AI工具</h2></div><div class="phpgenera_Details_mainR3_bottom"><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh-tw/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/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://m.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://m.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/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/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://m.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://m.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/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/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://m.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://m.php.cn/zh-tw/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/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://m.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://m.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/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/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://m.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://m.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/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="/static/imghwm/hotarticle2.png" src="/static/imghw/default1.png" alt="" /><h2>熱門文章</h2></div><div class="phpgenera_Details_mainR4_bottom"><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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>3 週前</span><span>By尊渡假赌尊渡假赌尊渡假赌</span></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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>3 週前</span><span>By尊渡假赌尊渡假赌尊渡假赌</span></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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>ByDDD</span></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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>3 週前</span><span>By尊渡假赌尊渡假赌尊渡假赌</span></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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>4 週前</span><span>By尊渡假赌尊渡假赌尊渡假赌</span></div></div></div><div class="phpgenera_Details_mainR3_more"><a href="https://m.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/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="/static/imghwm/hottools2.png" src="/static/imghw/default1.png" alt="" /><h2>熱工具</h2></div><div class="phpgenera_Details_mainR3_bottom"><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh-tw/toolset/development-tools/1527" title="VSCode Windows 64位元 下載" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/5e2151b57e8e3927.png" src="/static/imghw/default1.png" alt="VSCode Windows 64位元 下載" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/zh-tw/toolset/development-tools/1527" title="VSCode Windows 64位元 下載" class="phpmain_tab2_mids_title"><h3>VSCode Windows 64位元 下載</h3></a><p>微軟推出的免費、功能強大的一款IDE編輯器</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh-tw/toolset/development-tools/1471" title="SublimeText3 Linux新版" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/5aab420a5fb42187.jpg" src="/static/imghw/default1.png" alt="SublimeText3 Linux新版" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/zh-tw/toolset/development-tools/1471" title="SublimeText3 Linux新版" class="phpmain_tab2_mids_title"><h3>SublimeText3 Linux新版</h3></a><p>SublimeText3 Linux最新版</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh-tw/toolset/development-tools/502" title="ZendStudio 13.5.1 Mac" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d3631514435840.png" src="/static/imghw/default1.png" alt="ZendStudio 13.5.1 Mac" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/zh-tw/toolset/development-tools/502" title="ZendStudio 13.5.1 Mac" class="phpmain_tab2_mids_title"><h3>ZendStudio 13.5.1 Mac</h3></a><p>強大的PHP整合開發環境</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh-tw/toolset/development-tools/1473" title="SublimeText3 英文版" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/5aab40b1a662e720.jpg" src="/static/imghw/default1.png" alt="SublimeText3 英文版" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/zh-tw/toolset/development-tools/1473" title="SublimeText3 英文版" class="phpmain_tab2_mids_title"><h3>SublimeText3 英文版</h3></a><p>推薦:為Win版本,支援程式碼提示!</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh-tw/toolset/development-tools/660" title="Atom編輯器mac版下載" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ed8cfa94c1a582.jpg" src="/static/imghw/default1.png" alt="Atom編輯器mac版下載" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/zh-tw/toolset/development-tools/660" title="Atom編輯器mac版下載" class="phpmain_tab2_mids_title"><h3>Atom編輯器mac版下載</h3></a><p>最受歡迎的的開源編輯器</p></div></div></div><div class="phpgenera_Details_mainR3_more"><a href="https://m.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/imghwm/default1.png'" onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy" data-src="/static/imghwm/hotarticle2.png" src="/static/imghw/default1.png" alt="" /><h2>熱門話題</h2></div><div class="phpgenera_Details_mainR4_bottom"><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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 class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png" alt="" /><span>7486</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png" alt="" /><span>15</span></div></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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 class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png" alt="" /><span>1377</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png" alt="" /><span>52</span></div></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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 class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png" alt="" /><span>77</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png" alt="" /><span>11</span></div></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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 class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png" alt="" /><span>51</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png" alt="" /><span>19</span></div></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.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 class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png" alt="" /><span>19</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png" alt="" /><span>38</span></div></div></div></div><div class="phpgenera_Details_mainR3_more"><a href="https://m.php.cn/zh-tw/faq/zt">顯示更多</a></div></div></div></div></main><ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5902227090019525" data-ad-slot="5027754603"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script><footer><div class="footer"><div class="footertop"><img src="/static/imghwm/logo.png" alt=""><p>公益線上PHP培訓,幫助PHP學習者快速成長!</p></div><div class="footermid"><a href="https://m.php.cn/zh-tw/about/us.html">關於我們</a><a href="https://m.php.cn/zh-tw/about/disclaimer.html">免責聲明</a><a href="https://m.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><script>isLogin = 0;</script><script type="text/javascript" src="/static/layui/layui.js"></script><script type="text/javascript" src="/static/js/global.js?4.9.47"></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' 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> 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> jQuery.fn.wait = function (func, times, interval) { var _times = times || -1, //100次 _interval = interval || 20, //20毫秒每次 _self = this, _selector = this.selector, //选择器 _iIntervalID; //定时器id if( this.length ){ //如果已经获取到了,就直接执行函数 func && func.call(this); } else { _iIntervalID = setInterval(function() { if(!_times) { //是0就退出 clearInterval(_iIntervalID); } _times <= 0 || _times--; //如果是正数就 -- _self = $(_selector); //再次选择 if( _self.length ) { //判断是否取到 func && func.call(_self); clearInterval(_iIntervalID); } }, _interval); } return this; } $("table.syntaxhighlighter").wait(function() { $('table.syntaxhighlighter').append("<p class='cnblogs_code_footer'><span class='cnblogs_code_footer_icon'></span></p>"); }); $(document).on("click", ".cnblogs_code_footer",function(){ $(this).parents('table.syntaxhighlighter').css('display','inline-table');$(this).hide(); }); $('.nphpQianCont').viewer({navbar:true,title:false,toolbar:false,movable:false,viewed:function(){$('img').click(function(){$('.viewer-close').trigger('click');});}}); </script><script>// 通用函数,用于显示或隐藏元素 function toggleElementsDisplay(className, show) { const elements = document.getElementsByClassName(className); for (let i = 0; i < elements.length; i++) { elements[i].style.display = show ? "block" : "none"; } } // 页面加载完成后执行的主函数 document.addEventListener("DOMContentLoaded", () => { // 1. 绑定菜单按钮事件 const bindMenuEvents = () => { const toggleDisplay = (className, show, eventId) => { const element = document.getElementById(eventId); if (element) { element.addEventListener("click", (event) => { event.preventDefault(); toggleElementsDisplay(className, show); }); } }; toggleDisplay("m_editormain12main", true, "fixed_tab_img"); toggleDisplay("m_editormain12main", false, "fixed_tab_topi"); toggleDisplay("m_editormain12main", false, "fixed_tab_close"); toggleDisplay("m_menu", true, "lan1sp"); toggleDisplay("m_menu", false, "m_editormain12main_topi_sp"); toggleDisplay("m_menu_lang", true, "lan1"); toggleDisplay("m_menu_lang", false, "m_editormain12main_topi_lan"); }; // 2. 绑定滚动链接事件 const bindScrollLinks = () => { const titleList = document.getElementById("fixed_tab_titlelist"); const menuMain = document.getElementsByClassName("m_editormain12main")[0]; const links = document.querySelectorAll('.fixed_tab_a'); links.forEach(linkElement => { if (linkElement) { linkElement.addEventListener("click", async (e) => { e.preventDefault(); e.stopPropagation(); // 先隐藏菜单 if (menuMain) menuMain.style.display = "none"; if (titleList) titleList.style.display = "none"; // 获取目标元素的 ID const targetId = linkElement.getAttribute('href').substring(1); const targetElement = document.getElementById(targetId); // 等待 DOM 更新 await new Promise(resolve => requestAnimationFrame(resolve)); // 滚动到目标位置 if (targetElement) { targetElement.scrollIntoView({ behavior: "smooth", block: "start" }); } }); } }); }; // 3. 绑定关闭按钮事件 const bindCloseButton = () => { const closeButton = document.querySelector(".phpgenera_Details_mainR1_close"); const container = document.querySelector(".phpgenera_Details_mainR1"); if (closeButton && container) { closeButton.addEventListener("click", (event) => { event.preventDefault(); container.style.display = "none"; }); } }; // 4. 初始化菜单交互功能 const initMenuInteraction = () => { const menuGroupElements = document.querySelectorAll('.layui-menu-item-group'); menuGroupElements.forEach(menuItem => { menuItem.addEventListener('click', function(event) { if (event.target.closest('.m_menusnames')) { return; } this.classList.toggle('layui-menu-item-down'); this.classList.toggle('layui-menu-item-up'); const subMenuContainer = this.querySelector('.m_menusnames'); const icon = this.querySelector('.layui-icon'); if (subMenuContainer && icon) { if (this.classList.contains('layui-menu-item-down')) { subMenuContainer.style.display = 'block'; icon.classList.remove('layui-icon-down'); icon.classList.add('layui-icon-up'); } else { subMenuContainer.style.display = 'none'; icon.classList.remove('layui-icon-up'); icon.classList.add('layui-icon-down'); } } }); }); }; // 5. 初始化 layui 功能 const initLayui = () => { if (typeof layui !== 'undefined') { layui.use(function () { var util = layui.util; if (util && util.fixbar) { util.fixbar({ on: { mouseenter: function (type) { if (layer && layer.tips) { layer.tips(type, this, { tips: 4, fixed: true, }); } }, mouseleave: function (type) { if (layer && layer.closeAll) { layer.closeAll("tips"); } }, }, }); } }); } }; // 执行所有初始化函数 bindMenuEvents(); bindScrollLinks(); bindCloseButton(); initMenuInteraction(); initLayui(); }); </script></body></html>