首頁 web前端 html教學 HTML5常用的標籤總結

HTML5常用的標籤總結

Jun 16, 2017 pm 05:15 PM
h5 html5 總結 標籤 用的

1、標籤:
作用:宣告是文件中的第一個成分,位於標籤之前。

2、標籤:
作用:此元素可告知瀏覽器其本身是HTML文件。
屬性:manifest:值(url)為離線使用定義快取資訊。

3、標籤:
作用:標籤用來定義文件的頭部,它是所有頭部元素的容器。
屬性:profile:值(URL)一個有空格分隔的URL列表,這些URL包含著有關頁面的元資料資訊。

4、標籤:<br>作用:元素可定義文件的標題。 <br>屬性:dir:值(rtl,ltr)規定元素中內容的文字方向。 <br>lang:值(language_code)規定元素中內容的語言代碼。 <br>xml:lang:值(language_code)規定XHTML文件中元素內容的語言代碼。 </p> <p>5、標籤:<body><br>作用:元素定義文檔的主體。 <br>屬性:alink:值(rgb(x,x,x),#xxxxxx,colorname)不贊成使用,請使用樣式取代它。規定文件中活動連結(active link)的顏色。 <br>background:值(URL)不贊成使用。請使用樣式取代它。規定文檔的<a href="http://www.php.cn/code/8294.html" target="_blank">背景圖像</a>。 <br>bgcolor:值(reb(x,x,x),#xxxxxx,colorname)不贊成使用。請使用樣式取代它。規定文件中的背景顏色。 <br>link:值(reb(x,x,x),#xxxxxx,colorname)不贊成使用。請使用樣式取代它。規定文件中未存取連結的預設顏色。 <br>text:值(reb(x,x,x),#xxxxxx,colorname)不贊成使用。請使用樣式取代它。規定文檔中所以文字的顏色。 <br>vlink:值(reb(x,x,x),#xxxxxx,colorname)不贊成使用。請使用樣式取代它。規定文件中已被存取連結的顏色。 </p> <p>6、標籤:<h1>到<h6>標籤<br>作用:<h1>-<h6>標籤了定義標題。 <h1>定義最大的標題,<h6>定義最小的標題。 <br>屬性:align:值(left,center,right,justify)不建議使用。請使用樣式取代它。規定標題中文字的排列。 </p> <p>7、標籤:<p><br>作用:標籤定義段落。 <br>屬性:align:值(left,center,right,justify)不建議使用。請使用樣式取代它。規定標題中文字的排列方式。 </p> <p>8、標籤:<br><br>作用:可插入一個簡單的換行符號。 <br>屬性:沒有可選屬性。 </p> <p>9、標籤:<hr><br>作用:標籤在HTML頁面建立一條水平線。 <br>屬性:align:值(center,left,right)不贊成使用。請使用樣式取代它。規定hr元素的對齊方式。 <br>noshade:值(noshade)不贊成使用。請使用樣式取代它。規定hr元素的顏色呈現為純色。 <br>size:值(pixels)不贊成使用。請使用樣式取代它。規定hr元素的高度(厚度)。 <br>width:值(pixels %)不贊成使用。請使用樣式取代它。規定hr元素的寬度。 </p> <p>10、標籤<!-- --><br>作用:註解標籤用於在來源文件中插入註解。 <br>屬性:沒有可選屬性。 </p> <p>11、標籤:<ul><br>作用:標籤定義無序列表。 <br>屬性:compact:值(compact)不贊成使用。請使用樣式取代它。規定清單呈現的效果比正常情況更小。 <br>type:值(disc,square,circle)不贊成使用。請使用樣式取代它。規定清單的項目符號的類型。 </p> <p>12、標籤:<ol><br>作用:標籤定義有序列表。 <br>屬性:compact:值(compact)HTML5 中不支援。 HTML4.01 中不贊成使用。規定清單呈現的效果比正常情況更小。 <br>reversed:值(reversed)規定清單順序為降序。 (9,8,7...)<br>start:值(number)規定有序列表的起始值。 <br>type:值(1,A,a,I,i)規定在清單中使用的標記類型。 </p> <p>13、標籤:<li><br>作用:標籤定義清單項目。 <li>標籤可使用在有序列表(<ol>)和無序列表(<ul>)中。 <br>屬性:type:值(A,a,I,i,1,disc,square,circle)不贊成使用。請使用樣式代替它。規定使用哪種項目符號。 <br>value:值(number)不贊成使用。請使用樣式代替它。規定列表項目的數字。 </p> <p>14、標籤:<dl><br>作用:標籤定義了定義清單。標籤用於結合<dt>(定義清單中的項目)和<dd>(描述清單中的項目)。 <br>屬性:沒有可選屬性。 </p> <p>15、標籤:<dt><br>作用:標籤定義了定義清單中的項目。 <br>屬性:沒有可選屬性。 </p> <p>16、標籤:<dd><br>作用:在定義清單中定義條目的定義部分。 <br>屬性:沒有可選屬性。 </p> <p>17、標籤:<a><br>作用:標籤定義超鏈接,用於從一張頁面鏈接到另一張頁面。 <a>元素最重要的屬性是href屬性,它指示連結的目標。 <br>屬性:charset:值(char_encoding)HTML5中不支援。規定被連結文件的字元集。 <br>coords:值(coordinates)HTML5中不支援。規定鏈接的座標。 <br>download:值(filename)規定被下載的超連結目標。 <br>href:值(URL)規定連結指向的頁面的URL。 <br>hreflang:值(language_code)規定被連結文檔的語言。 <br>media:值(media_query)規定被連結文件是為何種媒介/裝置最佳化的。 <br>name:值(section_name)HTML5中不支援。規定錨的名稱。 <br>rel:值(text)規定目前文件與被連結文件之間的關係。 <br>rev:值(text)HTML5中不支援。規定連結文件與目前文件之間的關係。 <br>shape:值(default,rect,circle,poly)HTML5中不支援。規定鏈接的形狀。 <br>target:值(_blank,_parent,_self,_top,framename)規定在何處開啟連結文件。 <br>type:值(MIME type)規定被連結文件的的MIME類型。 </p> <p>18、標籤:<nav><br>作用:標籤定義導覽連結的部分。 <br>屬性:沒有可選屬性。 </p> <p>19、標籤:<table><br>作用:標籤定義HTML表格。 <br>屬性:align:值(left,center,right)不贊成使用。請使用樣式代替。規定表格相對周圍元素的對齊方式。 <br>bgcolor:值(rgb(x,x,x),#xxxxxx,colorname)不贊成使用。請使用樣式代替。規定表格的背景顏色。 <br>border:值(pixels)規定表格邊框的寬度。 <br>cellpadding:值(pixels %)規定單元邊緣與其內容之間的空白。 <br>cellspacing:值(pixels %)規定儲存格之間的空白。 <br>frame:值(void,above,below,hsides,lhs,rhs,vsides,box,border)規定外側邊框的哪個部分是可見的。 <br>rules:值(none,groups,rows,cols,all)規定內側邊框的哪個部分是可見的。 <br>summar:值(text)規定表格的摘要。 <br>width:值(% pixels)規定表格的寬度。 </p> <p>20、標籤:<caption><br>作用:標籤定義表格的標題。 <caption>標籤必須直接放置到<table>標籤之後。 <br>屬性:align:值(left,right,top,bottom)不贊成使用。請使用樣式取而代之。規定標題的對齊方式。 </p> <p>21、標籤:<th>列<br>作用:定義表格內的表頭儲存格。 <th>元素內部的文字會呈現為居中的粗體文字。 <br>屬性:abbr:值(text)規定儲存格中內容的縮寫版本。 <br>align:值(left,right,center,justify,char)規定儲存格內容的水平對齊方式。 <br>axis:值(category_name)對儲存格進行分類。 <br>bgcolor:值(rgb(x,x,x),#xxxxxx,colorname)不建議使用。請使用樣式代替它。規定表格單元格的背景顏色。 <br>char:值(character)規定根據哪個字元來進行內容的對齊。 <br>charoff:值(number)規定對齊字元的偏移量。 <br>colspan:值(number)設定單元格可橫跨的列數。 <br>headers:值(idrefs)有空格分隔的表頭單元格ID列表,為資料單元格提供表頭資訊。 <br>height:值(pixels %)不建議使用。請使用樣式代替它。規定表格單元格的高度。 <br>nowrap:值(nowrap)不建議使用。請使用樣式替代它。規定儲存格中的內容是否折行。 <br>rowspan:值(number)規定儲存格可橫跨的行數。 <br>scope:值(col,colgroup,row,rowgroup)定義將表頭資料與單元資料相關聯的方法。 <br>valign:值(top,middle,bottom,baseline)規定單元格內容的垂直排列方式。 <br>width:值(pixels %)不建議使用。請使用樣式取而代之。規定表格單元格的寬度。 </p> <p>22、標籤:<tr>行<br>作用:標籤定義HTML表格中的行。 <br>屬性:align:值(right,left,center,justify,char)定義表格行的內容對齊方式。 <br>bgcolor:值(rgb(x,x,x)#xxxxxx,colorname)不贊成使用。請使用樣式取而代之。規定表格行的背景顏色。 <br>char:值(character)規定根據哪個字元來進行文字對齊。 <br>charoff:值(number)規定第一個對齊字元的偏移量。 <br>valign:值(top,middle,bottom,baseline)規定表格行內容。 </p> <p>23、標籤:<td>普通欄位<br>作用:標籤定義了定義清單中的項目。 td元素內的文字通常是左對齊。 <br>屬性:abbr:值(text)規定儲存格中內容的縮寫版本。 <br>align:值(left,right,center,justify,char)規定儲存格內容的水平對齊方式。 <br>axis:值(category_name)對單元進行分類。 <br>bgcolor:值(rgb(x,x,x),#xxxxxx,colorname)不贊成使用。請使用樣式取而代之。規定單元格的背景顏色。 <br>char:值(character)規定根據哪個字元來進行內容的對齊。 <br>charoff:值(number)規定對齊字元的偏移量。 <br>colspan:值(number)規定儲存格可橫跨的列數。 <br>headers:值(header_cells'_id)規定與儲存格相關的表頭。 <br>height:值(pixels %)不贊成使用。請使用樣式取而代之。規定表格單元格的高度。 <br>nowrap:值(nowrap)不贊成使用。請使用樣式取而代之。規定儲存格中的內容是否折行。 <br>rowspan:值(number)規定儲存格可橫跨的行數。 <br>scope:值(col,colgroup,row,rowgroup)定義將表頭資料與單元資料相關聯的方法。 <br>valign:值(top,middle,bottom,baseline)規定單元格內容的垂直排列方式。 <br>width:值(pixels %)不贊成使用。請使用樣式取而代之。規定表格單元格的寬度。 </p> <p>24、標籤:<img><br>作用:img元素向網頁中嵌入一幅圖片。 <br>屬性:必要的屬性:src屬性:值(URL)規定顯示圖像的URL和alt屬性:值(text)規定圖像的代替文字。 <br>可選屬性:align:值(top,bottom,middle,left,right)不建議使用。規定如何根據周圍的文字來排列圖像。 <br>border:值(pixels)不建議使用。定義影像周圍的邊框。 <br>height:值(pixels %)定義影像的高度。 <br>hspace:值(pixels)不建議使用,定義影像左側和右側的空白。 <br>ismap:值(URL)將映像定義為伺服器端影像映射。 <br>longdesc:值(URL)指向包含長的圖片描述文件的URL。 <br>usemap:值(URL)將映像定義為客戶器端映像映射。 <br>vspace:值(pixels)不建議使用。定義影像頂部和底部的空白。 <br>width:值(pixels %)設定影像的寬度。 </p> <p>25、標籤:<audio><br>作用:元素能夠播放聲音檔案或音訊串流。 <br>屬性:autoplay:值(autoplay)如果出現該屬性,則音訊在就緒後馬上播放。 <br>controls:值(controls)如果出現該屬性,則向使用者顯示控件,例如播放按鈕。 <br>loop:值(loop)如果出現該屬性,則每當音訊結束時重新開始播放。 <br>muted:值(muted)規定視訊輸出應該被靜音。 <br>preload:值(preload)如果出現該屬性,則音訊在頁面加載時進行加載,並預備播放,如果使用"autoplay",則忽略該屬性。 <br>src:值(url)要播放的音訊URL。 </p> <p>26、標籤<video><br>作用:HTML5規定了一種透過video元素來包含影片的標準方式。 <br>屬性:autoplay:值(autoplay)如果出現該屬性,則影片在就緒後馬上播放。 <br>controls:值(controls)如果出現該屬性,則向使用者顯示控件,例如播放按鈕。 <br>height:值(pixels)設定影片播放器的高度。 <br>loop:值(loop)如果出現該屬性,則當媒介檔案完成播放後再次開始播放。 <br>preload:值(preload)如果出現該屬性,則影片在頁面加載時進行加載,並預備播放。如果使用"autoplay",則忽略該屬性。 <br>src:值(url)要播放的影片的url。 <br>width:值(pixels)設定視訊播放器的寬度。 </p> <p>27、標籤<source><br>作用:標籤為媒介元素,定義媒介資源。 <br>屬性:media:值(media query)規定媒體資源的型別。 <br>src:值(url)規定媒體檔案的URL。 <br>type:值(numeric value)規定媒體資源的MIME型別。 </p> <p>28、標籤:<form><br>作用:標籤用於為使用者輸入建立HTML表單。 <br>屬性:accept:值(MIME_type)HTML5中不支援。 <br>accept-charset:值(charset_list)規定伺服器可處理的表單資料字元集。 <br>action:值(URL)規定提交表單時要向何處傳送表單資料。 <br>autocomplete:值(on,off)規定是否啟用表單的<a href="http://www.php.cn/code/6615.html" target="_blank">自動完成</a>功能。 <br>method:值(get,post)規定用來傳送form-data 的http方法。 <br>name:值(form_name)規定表單的名稱。 <br>target:值(_blank,_self,_parent,_top,foamename)規定在何處開啟 action URL。 </p> <p>29、標籤:<input><br>作用:標籤用來收集使用者資訊。 <br>屬性:accept:值(mime_type)規定透過<a href="http://www.php.cn/code/6649.html" target="_blank">檔案上傳</a>來提交的檔案的類型。 <br>align:值(left,right,top,middle,bottom)不贊成使用。規定影像輸入的對齊方式。 <br>alt:值(text)定義影像輸入的替代文字。 <br>autocomplete:值(on,off)規定是否使用輸入欄位的自動完成功能。 <br>autofocus:值(autofocus)規定輸入欄位在頁面載入時是否獲得焦點。 <br>checked:值(checked)規定此input元素首次載入時應被選取。 <br>disabled:值(disabled)當input元素載入時停用此元素。 <br>form:值(formname)規定輸入欄位所屬的一個或多個表單。 <br>formaction:值(url)覆寫表單的action屬性。 <br>height:值(pixels %)定義input欄位的高度。 <br>list:值(datalist-id)引用包含輸入欄位的預先定義選項的datalist。 <br>max:值(number,date)規定輸入欄位的最大值。 <br>maxlength:值(number)規定輸入欄位中的字元的最大長度。 <br>min:值(number,date)規定輸入欄位的最小值。 <br>name:值(field_name)定義input元素的名稱。 <br>readonly:值(readonly)規定輸入欄位為唯讀。 <br>size:值(number_of_char)定義輸入欄位的寬度。 <br>type:值(button,checkbox,file,hidden,image,password,radio,reset,submit,text)規定input元素的型別。 <br>value:值(value)規定input元素的值。 <br>width:值(pixels,%)定義input欄位的寬度。 </p> <p>30、標籤:<textarea><br>作用:標籤定義多行的文字輸入控制項。 <br>屬性:autofocus:值(autofocus)規定在頁面載入後文字區域自動取得焦點。 <br>cols:值(number)規定文字區內的可見寬度。 <br>disabled:值(disabled)規定停用該文字區。 <br>form:值(form_id)規定文字區域所屬的一個或多個表單。 <br>maxlength:值(number)規定文字區域的最大字元數。 <br>name:值(name_of_textarea)規定文字區的名稱。 <br>placeholder:值(text)規定描述文字區域預期值的簡短提示。 <br>readonly:值(readonly)規定文字區為唯讀。 <br>rows:值(number)規定文字區域的可見行數。 </p> <p>31、標籤:<button><br>作用:標籤定義一個按鈕。 <br>屬性:disabled:值(disabled)規定應該禁用該按鈕。 <br>form:值(form_name)規定按鈕屬於一個或多個表單。 <br>name:值(button_name)規定按鈕的名稱。 <br>type:值(button,reset,submit)規定按鈕的類型。 <br>value:值(text)規定按鈕的初始值。 </p> <p>32、標籤:<select><br>作用:元素可建立單選或多選選單。 <br>屬性:data:值(url)供自動<a href="http://www.php.cn/code/5336.html" target="_blank">插入資料</a>。 <br>disabled:值(true,false)當該屬性為true時,會停用該選單。 <br>form:值(true,false)定義select欄位所屬的一個或多個表單。 <br>multiple:值(true,false)當該屬性為true時,規定可一次選定多個項目。 <br>name:值(unique_name)定義<a href="http://www.php.cn/code/7266.html" target="_blank">下拉清單</a>的唯一識別碼。 <br>size:值(number)定義選單中可見項目的數目。不支援</p> <p>33、標籤:<optgroup><br>作用:標籤定義選項組。 <br>屬性:label:值(text)為選項組規定描述。 <br>disabled:值(disabled)規定停用該選項組。 </p> <p>34、標籤:<option><br>作用:元素定義下拉清單中的一個選項。 <br>屬性:disabled:值(disabled)規定次選項應在首次載入時被停用。 <br>label:值(text)定義使用<optgroup>時所使用的標註。 <br>selected:值(selected)規定選項表現為選取狀態。 <br>value:值(text)定義送到伺服器的選項值。 </p> <p>35、標籤:表單域<br>{<br>  單行文字域:<input type="text" /><br>  密碼文字域:<input type="password" / ><br>  <a href="http://www.php.cn/code/5979.html" target="_blank">單選按鈕</a>:<input type="radio" /><br>  多選按鈕:<input type="checkbox" /><br>  隱藏域: <input type="hidden" /><br>  提交按鈕:<input type="submit" /><br>  重置按鈕:<input type="reset" /><br>  自重 自定義按鈕:<input type="button" /><br>  檔案上傳:<input type="file"/><br>  多行文字域:<textarea /><br> 下拉清單清單域:<select /><br>}</p> <p> </p> <p>#註:可能不是很齊全,但基本上都是一些常用的。 </p><p>以上是HTML5常用的標籤總結的詳細內容。更多資訊請關注PHP中文網其他相關文章!</p> </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>2 週前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796773439.html" title="倉庫:如何復興隊友" class="phpgenera_Details_mainR4_bottom_title">倉庫:如何復興隊友</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/1796774171.html" title="Hello Kitty Island冒險:如何獲得巨型種子" class="phpgenera_Details_mainR4_bottom_title">Hello Kitty Island冒險:如何獲得巨型種子</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://www.php.cn/zh-tw/faq/1796775427.html" title="擊敗分裂小說需要多長時間?" class="phpgenera_Details_mainR4_bottom_title">擊敗分裂小說需要多長時間?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 週前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796775336.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 DDD</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>2 週前</span> <span>By 尊渡假赌尊渡假赌尊渡假赌</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796773439.html" title="倉庫:如何復興隊友" class="phpgenera_Details_mainR4_bottom_title">倉庫:如何復興隊友</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/1796774171.html" title="Hello Kitty Island冒險:如何獲得巨型種子" class="phpgenera_Details_mainR4_bottom_title">Hello Kitty Island冒險:如何獲得巨型種子</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://www.php.cn/zh-tw/faq/1796775427.html" title="擊敗分裂小說需要多長時間?" class="phpgenera_Details_mainR4_bottom_title">擊敗分裂小說需要多長時間?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 週前</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/1796775336.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 DDD</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>7314</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>9</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/java-tutorial" title="Java教學" class="phpgenera_Details_mainR4_bottom_title">Java教學</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1625</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>14</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>1348</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>46</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/laravel-tutori" title="Laravel 教程" class="phpgenera_Details_mainR4_bottom_title">Laravel 教程</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1260</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>25</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/zh-tw/faq/php-tutorial" title="PHP教程" class="phpgenera_Details_mainR4_bottom_title">PHP教程</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1207</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>29</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 中的表格邊框</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/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 左邊距</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 表格佈局</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 中移動文字</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 有序列表</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 按鈕</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 輸入佔位符</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?1743483025"></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>