搜索
首页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


标题的设置


一号标题


二号标题


三号标题


四号标题


五号标题

六号标题

财富杂志:谷歌为何不会盛极而衰


   

遭遇潜在问题


  

    一些业内人士认为,长期垄断互联网搜索和广告市场谷歌可能会盛极而衰。...与此同时,谷歌近日推出的多项新计划,例如开放手机联盟、社交网站通用平台OpenSocial、以及可能投资数十亿美元竞购无线频段,也遭到了广泛的质疑。
  

将继续垄断搜索


  

    最近有一些文章称,如果出现更好的搜索引擎,人们会毫不犹豫地放弃谷歌。但是,即使真有更好的搜索引擎出现,谷歌仍然可以在一段时间内屹立不倒。...在这种情况下,网站速度往往会成为决定胜负的关键。




在浏览器地址栏输入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" 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" 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/faq/1796796827.html" title="HTML与CSS vs. 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/174473305338023.jpg?x-oss-process=image/resize,p_40" alt="HTML与CSS vs. JavaScript:比较概述" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh/faq/1796796827.html" title="HTML与CSS vs. JavaScript:比较概述" class="phphistorical_Version2_mids_title">HTML与CSS vs. JavaScript:比较概述</a><span class="Articlelist_txts_time">Apr 16, 2025 am 12:04 AM</span><p class="Articlelist_txts_p">HTML、CSS和JavaScript在网页开发中的角色分别是:HTML负责内容结构,CSS负责样式,JavaScript负责动态行为。1.HTML通过标签定义网页结构和内容,确保语义化。2.CSS通过选择器和属性控制网页样式,使其美观易读。3.JavaScript通过脚本控制网页行为,实现动态和交互功能。</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh/faq/1796796249.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/174464723172609.jpg?x-oss-process=image/resize,p_40" alt="HTML:是编程语言还是其他?" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh/faq/1796796249.html" title="HTML:是编程语言还是其他?" class="phphistorical_Version2_mids_title">HTML:是编程语言还是其他?</a><span class="Articlelist_txts_time">Apr 15, 2025 am 12:13 AM</span><p class="Articlelist_txts_p">HTMLISNOTAPROGRAMMENGUAGE; ITISAMARKUMARKUPLAGUAGE.1)htmlStructures andFormatSwebContentusingtags.2)itworkswithcsssforstylingandjavascript for Interactivity,增强WebevebDevelopment。</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh/faq/1796795665.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/174456085285529.jpg?x-oss-process=image/resize,p_40" alt="HTML:建立网页的结构" src="/static/imghw/default1.png" /></a><a href="https://m.php.cn/zh/faq/1796795665.html" title="HTML:建立网页的结构" class="phphistorical_Version2_mids_title">HTML:建立网页的结构</a><span class="Articlelist_txts_time">Apr 14, 2025 am 12:14 AM</span><p class="Articlelist_txts_p">HTML是构建网页结构的基石。1.HTML定义内容结构和语义,使用、、等标签。2.提供语义化标记,如、、等,提升SEO效果。3.通过标签实现用户交互,需注意表单验证。4.使用、等高级元素结合JavaScript实现动态效果。5.常见错误包括标签未闭合和属性值未加引号,需使用验证工具。6.优化策略包括减少HTTP请求、压缩HTML、使用语义化标签等。</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/zh/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/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/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/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/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/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/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/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/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/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><a href="https://m.php.cn/zh/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/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/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/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/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/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/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/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/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/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/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/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/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://m.php.cn/zh/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://m.php.cn/zh/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/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://m.php.cn/zh/faq/1796780523.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><div class="phpgenera_Details_mainR3_more"><a href="https://m.php.cn/zh/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/toolset/development-tools/1557" title="mPDF" 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/003/169206948656118.png" src="/static/imghw/default1.png" alt="mPDF" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/zh/toolset/development-tools/1557" title="mPDF" class="phpmain_tab2_mids_title"><h3>mPDF</h3></a><p>mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh/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/toolset/development-tools/660" title="Atom编辑器mac版下载" class="phpmain_tab2_mids_title"><h3>Atom编辑器mac版下载</h3></a><p>最流行的的开源编辑器</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh/toolset/development-tools/1492" title="EditPlus 中文破解版" 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/5e21527e79622256.png" src="/static/imghw/default1.png" alt="EditPlus 中文破解版" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/zh/toolset/development-tools/1492" title="EditPlus 中文破解版" class="phpmain_tab2_mids_title"><h3>EditPlus 中文破解版</h3></a><p>体积小,语法高亮,不支持代码提示功能</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh/toolset/development-tools/510" title="PhpStorm 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/58d377b7b49ae828.jpg" src="/static/imghw/default1.png" alt="PhpStorm Mac 版本" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/zh/toolset/development-tools/510" title="PhpStorm Mac 版本" class="phpmain_tab2_mids_title"><h3>PhpStorm Mac 版本</h3></a><p>最新(2018.2.1 )专业的PHP集成开发工具</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/zh/toolset/development-tools/506" title="WebStorm 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/58d36e6254963493.png" src="/static/imghw/default1.png" alt="WebStorm Mac版" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/zh/toolset/development-tools/506" title="WebStorm Mac版" class="phpmain_tab2_mids_title"><h3>WebStorm Mac版</h3></a><p>好用的JavaScript开发工具</p></div></div></div><div class="phpgenera_Details_mainR3_more"><a href="https://m.php.cn/zh/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/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>7519</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/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>1378</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/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>81</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/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>53</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/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>21</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>68</span></div></div></div></div><div class="phpgenera_Details_mainR3_more"><a href="https://m.php.cn/zh/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/about/us.html">关于我们</a><a href="https://m.php.cn/zh/about/disclaimer.html">免责声明</a><a href="https://m.php.cn/zh/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>