资讯专栏INFORMATION COLUMN

探究行内元素和块级元素

loostudy / 835人阅读

摘要:此元素将显示为块级元素,此元素前后会带有换行符。新增的值此元素会作为列表显示。块级元素和行内元素的分类中的块级元素标签描述定义地址。定义围绕表单中元素的边框。定义预定义范围内的度量。定义针对不支持框架的用户的替代内容。定义表格中的单元。

标签(空格分隔): CSS

html中元素主要分为行内元素和块级元素

行内元素

[x] 不独占一行

[x] 书写完成后不会自动换行

[x] 没有宽和高

块级元素

[x] 独占一行

[x] 书写完会自动换行

[x] 宽和高可以修改

还有一种特殊的元素叫作行内块级元素

描述
none 此元素不会被显示。
block 此元素将显示为块级元素,此元素前后会带有换行符。
inline 默认。此元素会被显示为内联元素,元素前后没有换行符。
inline-block 行内块元素。(CSS2.1 新增的值)
list-item 此元素会作为列表显示。
块级元素和行内元素的分类
html中的块级元素:
标签 描述
定义地址。
定义文章。
定义页面内容之外的内容。
定义声音内容。
定义长的引用。
定义图形。
定义表格标题。
定义定义列表中项目的描述。
定义文档中的节。
定义定义列表。
定义定义列表中的项目。
`
定义元素的细节。
定义围绕表单中元素的边框。
定义 figure 元素的标题。
定义媒介内容的分组,以及它们的标题。
定义 section 或 page 的页脚。
定义供用户输入的 HTML 表单。

to

定义 HTML 标题。
定义 section 或 page 的页眉。

定义水平线。
定义 fieldset 元素的标题。
  • 定义列表的项目。
    定义命令的列表或菜单。
    定义预定义范围内的度量。
    定义导航链接。
    </b></td> <td align="right">定义针对不支持框架的用户的替代内容。</td> </tr> <tr> <td><b><noscript> </b></td> <td align="right">定义针对不支持客户端脚本的用户的替代内容。</td> </tr> <tr> <td><b><ol> </b></td> <td align="right">定义有序列表。</td> </tr> <tr> <td><b><output> </b></td> <td align="right">定义输出的一些类型。</td> </tr> <tr> <td><b><p> </b></td> <td align="right">定义段落。</td> </tr> <tr> <td><b><pre> </b></td> <td align="right">定义预格式文本。</td> </tr> <tr> <td><b><section> </b></td> <td align="right">定义 section。</td> </tr> <tr> <td><b><table> </b></td> <td align="right">定义表格。</td> </tr> <tr> <td><b><tbody> </b></td> <td align="right">定义表格中的主体内容。</td> </tr> <tr> <td><b><td> </b></td> <td align="right">定义表格中的单元。</td> </tr> <tr> <td><b><tfoot> </b></td> <td align="right">定义表格中的表注内容(脚注)。</td> </tr> <tr> <td><b><th> </b></td> <td align="right">定义表格中的表头单元格。</td> </tr> <tr> <td><b><thead> </b></td> <td align="right">定义表格中的表头内容。</td> </tr> <tr> <td><b><time></b></td> <td align="right">定义日期/时间。</td> </tr> <tr> <td><b><tr> </b></td> <td align="right">定义表格中的行。</td> </tr> <tr> <td><b><ul> </b></td> <td align="right">定义无序列表。</td> </tr> </tbody> </table> <pre>html中的行内元素:</pre> <table> <thead><tr> <th>标签</th> <th align="right">描述</th> </tr></thead> <tbody> <tr> <td><b><a></b></td> <td align="right">定义锚。</td> </tr> <tr> <td><b><abbr></b></td> <td align="right">定义缩写。</td> </tr> <tr> <td><b><acronym> </b></td> <td align="right">定义只取首字母的缩写。</td> </tr> <tr> <td><b><b></b></td> <td align="right">定义粗体字</td> </tr> <tr> <td><b><bdo></b></td> <td align="right">定义文字方向。</td> </tr> <tr> <td><b><big></b></td> <td align="right">定义大号文本。</td> </tr> <tr> <td><b><br> </b></td> <td align="right">定义简单的折行。</td> </tr> <tr> <td><b><button> </b></td> <td align="right">定义按钮 (push button)。</td> </tr> <tr> <td><b><cite></b></td> <td align="right">定义引用(citation)。</td> </tr> <tr> <td><b><code></b></td> <td align="right">定义计算机代码文本。</td> </tr> <tr> <td><b><command> </b></td> <td align="right">定义命令按钮。</td> </tr> <tr> <td><b><dfn> </b></td> <td align="right">定义定义项目。</td> </tr> <tr> <td><b><del></b></td> <td align="right">定义被删除文本。</td> </tr> <tr> <td><b><em> </b></td> <td align="right">定义强调文本。</td> </tr> <tr> <td><b><embed></b></td> <td align="right">定义外部交互内容或插件。</td> </tr> <tr> <td><b><i></b></td> <td align="right">定义斜体字。</td> </tr> <tr> <td><b><img> </b></td> <td align="right">定义图像。</td> </tr> <tr> <td><b><input></b></td> <td align="right">定义输入控件。</td> </tr> <tr> <td><b><kbd> </b></td> <td align="right">定义键盘文本。</td> </tr> <tr> <td><b><label> </b></td> <td align="right">定义 input 元素的标注。</td> </tr> <tr> <td><b><map> </b></td> <td align="right">定义图像映射。</td> </tr> <tr> <td><b><mark></b></td> <td align="right">定义有记号的文本。</td> </tr> <tr> <td><b><objec> </b></td> <td align="right">定义内嵌对象。</td> </tr> <tr> <td><b><progress></b></td> <td align="right">定义任何类型的任务的进度。</td> </tr> <tr> <td><b><q></b></td> <td align="right">定义短的引用。</td> </tr> <tr> <td><b><samp> </b></td> <td align="right">定义计算机代码样本。</td> </tr> <tr> <td><b><select> </b></td> <td align="right">定义选择列表(下拉列表)。</td> </tr> <tr> <td><b><small> </b></td> <td align="right">定义小号文本。</td> </tr> <tr> <td><b><span> </b></td> <td align="right">定义文档中的节。</td> </tr> <tr> <td><b><strong> </b></td> <td align="right">定义强调文本。</td> </tr> <tr> <td><b><sub> </b></td> <td align="right">定义下标文本。</td> </tr> <tr> <td><b><sup> </b></td> <td align="right">定义上标文本。</td> </tr> <tr> <td><b><textarea> </b></td> <td align="right">定义多行的文本输入控件。</td> </tr> <tr> <td><b><time> </b></td> <td align="right">定义日期/时间。</td> </tr> <tr> <td><b><tt> </b></td> <td align="right">定义打字机文本。</td> </tr> <tr> <td><b><var> </b></td> <td align="right">定义文本的变量部分。</td> </tr> <tr> <td><b><video> </b></td> <td align="right">定义视频。</td> </tr> <tr> <td><b><wbr> </b></td> <td align="right">定义可能的换行符。</td> </tr> </tbody> </table> <pre>实例</pre> <p>我们书写几个<b>span</b>标签<br><script type="text/javascript">showImg("http://oano.cn/images/hangnei.GIF");</script></p> <p>可以看到几个span都出现在了一行内</p> <p>我们再书写几个<b>div</b>标签<br><script type="text/javascript">showImg("http://oano.cn/images/b1.png");</script></p> <p>可以看到div已经垂直了(不在一行内)<br>继续:我们给<b>div</b>添加一个刚才提到的特殊元素:行内块级元素<b>inline-block</b><br><script type="text/javascript">showImg("http://oano.cn/images/b2.png");</script></p> <p><script type="text/javascript">showImg("http://oano.cn/images/b3.png");</script><br>此时<b>div</b>会变成行内块级元素,同时宽和高也在<br>因此 <b>inline-block</b>既有行内元素水平排列的特点,也有块级元素设置宽高的特点</p> <p>仔细看上图,会发现水平方向有一个bug,有一个间隔 空闲时间可以去百度下hack~</p> <p>解决办法:</p> <p>①<b>margin:-3px</b> ②<b>position:relitive;left:-3px;</b> </p> <p>关于行内元素和块级元素先谈这么多,听说认真阅读并点赞的你,代码敲的最6哦~<br>有兴趣的小伙伴可以加我微信,一起讨论;V-x: dandanshen987</p> <b>有一天,当你明白"小白" +"勤奋"的时候,你就会成为大牛</b> </div> <div class="mt-64 tags-seach" > <div class="tags-info"> <a style="width:120px;" title="专线服务" href="https://www.ucloud.cn/site/active/network.html?ytag=seo">专线服务</a> <a style="width:120px;" title="云服务器" href="https://www.ucloud.cn/site/product/uhost.html">云服务器</a> <a style="width:120px;" title="php 行内元素" href="https://www.ucloud.cn/yun/tag/php xingneiyuansu/">php 行内元素</a> <a style="width:120px;" title="html设置行内元素" href="https://www.ucloud.cn/yun/tag/htmlshezhixingneiyuansu/">html设置行内元素</a> <a style="width:120px;" title="设计元素" href="https://www.ucloud.cn/yun/tag/shejiyuansu/">设计元素</a> <a style="width:120px;" title="随机元素" href="https://www.ucloud.cn/yun/tag/suijiyuansu/">随机元素</a> </div> </div> <div class="entry-copyright mb-30"> <p class="mb-15"> 文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。</p> <p>转载请注明本文地址:https://www.ucloud.cn/yun/114620.html</p> </div> <ul class="pre-next-page"> <li class="ellipsis"><a class="hpf" href="https://www.ucloud.cn/yun/114619.html">上一篇:使用CSS实现逼真的水波纹点击效果</a></li> <li class="ellipsis"><a class="hpf" href="https://www.ucloud.cn/yun/114621.html">下一篇:重学前端学习笔记(十四)--浏览器工作解析(四)</a></li> </ul> </div> <div class="about_topicone-mid"> <h3 class="top-com-title mb-0"><span data-id="0">相关文章</span></h3> <ul class="com_white-left-mid atricle-list-box"> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/55011.html"><b><em>探究</em><em>行内</em><em>元素</em><em>和<em>块级</em></em><em>元素</em></b></a></h2> <p class="ellipsis2 good">摘要:此元素将显示为块级元素,此元素前后会带有换行符。新增的值此元素会作为列表显示。块级元素和行内元素的分类中的块级元素标签描述定义地址。定义围绕表单中元素的边框。定义预定义范围内的度量。定义针对不支持框架的用户的替代内容。定义表格中的单元。 标签(空格分隔): CSS 在html中元素主要分为行内元素和块级元素 行内元素 [x] 不独占一行 [x] 书写完成后不会自动换行 [x] 没...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-1015.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/10/small_000001015.jpg" alt=""><span class="layui-hide64">arashicage</span></a> <time datetime="">2019-08-02 16:16</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/54523.html"><b>前端面试题-<em>行内</em><em>元素</em><em>和<em>块级</em></em><em>元素</em></b></a></h2> <p class="ellipsis2 good">摘要:二块级元素块级元素占据其父元素容器的整个空间,因此创建了一个块。而块级元素可以包含行内元素和其他块级元素。格式默认情况下,行内元素不会以新行开始,而块级元素会新起一行。 一、行内元素 一个行内元素只占据它对应标签的边框所包含的空间。 二、块级元素 块级元素占据其父元素(容器)的整个空间,因此创建了一个块。通常浏览器会在块级元素前后另起一个新行。 三、行内元素示例 HTML showIm...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-739.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/07/small_000000739.jpg" alt=""><span class="layui-hide64">int64</span></a> <time datetime="">2019-08-02 16:01</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/115890.html"><b>前端面试题-<em>行内</em><em>元素</em><em>和<em>块级</em></em><em>元素</em></b></a></h2> <p class="ellipsis2 good">摘要:二块级元素块级元素占据其父元素容器的整个空间,因此创建了一个块。而块级元素可以包含行内元素和其他块级元素。格式默认情况下,行内元素不会以新行开始,而块级元素会新起一行。 一、行内元素 一个行内元素只占据它对应标签的边框所包含的空间。 二、块级元素 块级元素占据其父元素(容器)的整个空间,因此创建了一个块。通常浏览器会在块级元素前后另起一个新行。 三、行内元素示例 HTML showIm...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-548.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/05/small_000000548.jpg" alt=""><span class="layui-hide64">cucumber</span></a> <time datetime="">2019-08-30 14:15</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/54754.html"><b><em>行内</em><em>元素</em><em>和<em>块级</em></em><em>元素</em></b></a></h2> <p class="ellipsis2 good">摘要:行内元素和块级元素讲讲行内元素和块级元素在中标签元素大都是块级元素或行内元素。 行内元素和块级元素 讲讲行内元素和块级元素在HTML中标签元素大都是块级元素或行内元素。 块级元素 HTML 我是div CSS .wrap{ width: 200px; ...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-350.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/03/small_000000350.jpg" alt=""><span class="layui-hide64">GitCafe</span></a> <time datetime="">2019-08-02 16:09</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="https://www.ucloud.cn/yun/117566.html"><b><em>行内</em><em>元素</em><em>和<em>块级</em></em><em>元素</em></b></a></h2> <p class="ellipsis2 good">摘要:行内元素和块级元素讲讲行内元素和块级元素在中标签元素大都是块级元素或行内元素。 行内元素和块级元素 讲讲行内元素和块级元素在HTML中标签元素大都是块级元素或行内元素。 块级元素 HTML 我是div CSS .wrap{ width: 200px; ...</p> <div class="com_white-left-info"> <div class="com_white-left-infol"> <a href="https://www.ucloud.cn/yun/u-690.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/06/small_000000690.jpg" alt=""><span class="layui-hide64">wushuiyong</span></a> <time datetime="">2019-08-30 15:56</time> <span><i class="fa fa-commenting"></i>评论0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> </ul> </div> <div class="topicone-box-wangeditor"> <h3 class="top-com-title mb-64"><span>发表评论</span></h3> <div class="xcp-publish-main flex_box_zd"> <div class="unlogin-pinglun-box"> <a href="javascript:login()" class="grad">登陆后可评论</a> </div> </div> </div> <div class="site-box-content"> <div class="site-content-title"> <h3 class="top-com-title mb-64"><span>0条评论</span></h3> </div> <div class="pages"></ul></div> </div> </div> <div class="layui-col-md4 layui-col-lg3 com_white-right site-wrap-right"> <div class=""> <div class="com_layuiright-box user-msgbox"> <a href="https://www.ucloud.cn/yun/u-398.html"><img src="https://www.ucloud.cn/yun/data/avatar/000/00/03/small_000000398.jpg" alt=""></a> <h3><a href="https://www.ucloud.cn/yun/u-398.html" rel="nofollow">loostudy</a></h3> <h6>男<span>|</span>高级讲师</h6> <div class="flex_box_zd user-msgbox-atten"> <a href="javascript:attentto_user(398)" id="attenttouser_398" class="grad follow-btn notfollow attention">我要关注</a> <a href="javascript:login()" title="发私信" >我要私信</a> </div> <div class="user-msgbox-list flex_box_zd"> <h3 class="hpf">TA的文章</h3> <a href="https://www.ucloud.cn/yun/ut-398.html" class="box_hxjz">阅读更多</a> </div> <ul class="user-msgbox-ul"> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/124013.html">GFCTF2021 部分WP</a></h3> <p>阅读 2458<span>·</span>2021-11-22 09:34</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/123216.html">Dmit ,中国香港pvm.hkg.pro vps测评(cn2 gia+AS10099+AS4837</a></h3> <p>阅读 4104<span>·</span>2021-11-15 18:13</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/121000.html">免费英文字体Hanson Bold 无衬线粗体字体 无需商业授权</a></h3> <p>阅读 2970<span>·</span>2021-09-24 10:24</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/120723.html">虚拟主机怎么传文件-虚拟主机怎么上传文件?</a></h3> <p>阅读 1134<span>·</span>2021-09-22 16:01</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/119272.html">程序员的算法趣题Q12: 平方根数字</a></h3> <p>阅读 2488<span>·</span>2021-09-06 15:02</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/115242.html">关于CSS的position属性</a></h3> <p>阅读 886<span>·</span>2019-08-30 13:01</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/114620.html">探究行内元素和块级元素</a></h3> <p>阅读 836<span>·</span>2019-08-30 10:52</p></li> <li><h3 class="ellipsis"><a href="https://www.ucloud.cn/yun/113858.html">::before和::after的详细介绍</a></h3> <p>阅读 507<span>·</span>2019-08-29 16:36</p></li> </ul> </div> <!-- 云社区相关服务 --> <div class="com_layuiright-box"> <h3 class="top-com-title"><span>云社区相关服务</span></h3> <div class="community-box flex_box flex_wrap community-box1"> <a href="https://www.ucloud.cn/yun/question/add.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon1.png" alt="提问"> <span>提问</span> </a> <a href="https://www.ucloud.cn/yun/article" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon2.png" alt="学习"> <span>学习</span> </a> <a href="https://www.ucloud.cn/yun/user/vertify.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon4.png" alt="认证"> <span>认证</span> </a> <a href="https://www.ucloud.cn/site/product/uhost.html?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon5.png" alt="产品"> <span>产品</span> </a> <a href="https://spt.ucloud.cn/30001?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon6.png" alt="技术服务"> <span>技术服务</span> </a> <a href="https://spt.ucloud.cn/30001?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/static/theme/ukd/images/topicone-icon3.png" alt="售前咨询"> <span>售前咨询</span> </a> </div> </div> <!-- 文章详情右侧广告--> <div class="com_layuiright-box"> <h6 class="top-com-title"><span>最新活动</span></h6> <div class="com_adbox"> <div class="layui-carousel" id="right-item"> <div carousel-item> <div> <a href="https://www.ucloud.cn/site/product/uhost.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220620/Z7TLrpAi.png" alt="云服务器"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/uhybrid.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220620/MWraMsBh.png" alt="混合云"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/ucloudstack.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220620/ifzOxvjW.png" alt="私有云"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/utrion.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220620/VDqwC1iN.png" alt="超融合服务器"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/uhybrid.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220630/pJwnviKN.png" alt="服务器托管"> </a> </div> <div> <a href="https://www.ucloud.cn/site/product/uxzone.html" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/220630/CDb5uXxp.jpeg" alt="idc机房托管"> </a> </div> <div> <a href="https://www.ucloud.cn/site/active/network.html?ytag=seo" rel="nofollow"> <img src="https://www.ucloud.cn/yun/data/attach/230227/XWsSXmvm.png" alt="专线服务"> </a> </div> </div> </div> </div> <!-- banner结束 --> <div class="adhtml"> </div> <script> $(function(){ $.ajax({ type: "GET", url:"https://www.ucloud.cn/yun/ad/getad/1.html", cache: false, success: function(text){ $(".adhtml").html(text); } }); }) </script> </div> </div> </div> </div> </div> </section> <!-- wap拉出按钮 --> <div class="site-tree-mobile layui-hide"> <i class="layui-icon layui-icon-spread-left"></i> </div> <!-- wap遮罩层 --> <div class="site-mobile-shade"></div> <!--付费阅读 --> <div id="payread"> <div class="layui-form-item">阅读需要支付1元查看</div> <div class="layui-form-item"><button class="btn-right">支付并查看</button></div> </div> <script> var prei=0; $(".site-seo-depict pre").each(function(){ var html=$(this).html().replace("<code>","").replace("</code>","").replace('<code class="javascript hljs" codemark="1">',''); $(this).attr('data-clipboard-text',html).attr("id","pre"+prei); $(this).html("").append("<code>"+html+"</code>"); prei++; }) $(".site-seo-depict img").each(function(){ if($(this).attr("src").indexOf('data:image/svg+xml')!= -1){ $(this).remove(); } }) $("LINK[href*='style-49037e4d27.css']").remove(); $("LINK[href*='markdown_views-d7a94ec6ab.css']").remove(); layui.use(['jquery', 'layer','code'], function(){ $("pre").attr("class","layui-code"); $("pre").attr("lay-title",""); $("pre").attr("lay-skin",""); layui.code(); $(".layui-code-h3 a").attr("class","copycode").html("复制代码 ").attr("onclick","copycode(this)"); }); function copycode(target){ var id=$(target).parent().parent().attr("id"); var clipboard = new ClipboardJS("#"+id); clipboard.on('success', function(e) { e.clearSelection(); alert("复制成功") }); clipboard.on('error', function(e) { alert("复制失败") }); } //$(".site-seo-depict").html($(".site-seo-depict").html().slice(0, -5)); </script> <link rel="stylesheet" type="text/css" href="https://www.ucloud.cn/yun/static/js/neweditor/code/styles/tomorrow-night-eighties.css"> <script src="https://www.ucloud.cn/yun/static/js/neweditor/code/highlight.pack.js" type="text/javascript"></script> <script src="https://www.ucloud.cn/yun/static/js/clipboard.js"></script> <script>hljs.initHighlightingOnLoad();</script> <script> function setcode(){ var _html=''; document.querySelectorAll('pre code').forEach((block) => { var _tmptext=$.trim($(block).text()); if(_tmptext!=''){ _html=_html+_tmptext; console.log(_html); } }); } </script> <script> function payread(){ layer.open({ type: 1, title:"付费阅读", shadeClose: true, content: $('#payread') }); } // 举报 function jupao_tip(){ layer.open({ type: 1, title:false, shadeClose: true, content: $('#jubao') }); } $(".getcommentlist").click(function(){ var _id=$(this).attr("dataid"); var _tid=$(this).attr("datatid"); $("#articlecommentlist"+_id).toggleClass("hide"); var flag=$("#articlecommentlist"+_id).attr("dataflag"); if(flag==1){ flag=0; }else{ flag=1; //加载评论 loadarticlecommentlist(_id,_tid); } $("#articlecommentlist"+_id).attr("dataflag",flag); }) $(".add-comment-btn").click(function(){ var _id=$(this).attr("dataid"); $(".formcomment"+_id).toggleClass("hide"); }) $(".btn-sendartcomment").click(function(){ var _aid=$(this).attr("dataid"); var _tid=$(this).attr("datatid"); var _content=$.trim($(".commenttext"+_aid).val()); if(_content==''){ alert("评论内容不能为空"); return false; } var touid=$("#btnsendcomment"+_aid).attr("touid"); if(touid==null){ touid=0; } addarticlecomment(_tid,_aid,_content,touid); }) $(".button_agree").click(function(){ var supportobj = $(this); var tid = $(this).attr("id"); $.ajax({ type: "GET", url:"https://www.ucloud.cn/yun/index.php?topic/ajaxhassupport/" + tid, cache: false, success: function(hassupport){ if (hassupport != '1'){ $.ajax({ type: "GET", cache:false, url: "https://www.ucloud.cn/yun/index.php?topic/ajaxaddsupport/" + tid, success: function(comments) { supportobj.find("span").html(comments+"人赞"); } }); }else{ alert("您已经赞过"); } } }); }); function attenquestion(_tid,_rs){ $.ajax({ //提交数据的类型 POST GET type:"POST", //提交的网址 url:"https://www.ucloud.cn/yun/favorite/topicadd.html", //提交的数据 data:{tid:_tid,rs:_rs}, //返回数据的格式 datatype: "json",//"xml", "html", "script", "json", "jsonp", "text". //在请求之前调用的函数 beforeSend:function(){}, //成功返回之后调用的函数 success:function(data){ var data=eval("("+data+")"); console.log(data) if(data.code==2000){ layer.msg(data.msg,function(){ if(data.rs==1){ //取消收藏 $(".layui-layer-tips").attr("data-tips","收藏文章"); $(".layui-layer-tips").html('<i class="fa fa-heart-o"></i>'); } if(data.rs==0){ //收藏成功 $(".layui-layer-tips").attr("data-tips","已收藏文章"); $(".layui-layer-tips").html('<i class="fa fa-heart"></i>') } }) }else{ layer.msg(data.msg) } } , //调用执行后调用的函数 complete: function(XMLHttpRequest, textStatus){ postadopt=true; }, //调用出错执行的函数 error: function(){ //请求出错处理 postadopt=false; } }); } </script> <footer> <div class="layui-container"> <div class="flex_box_zd"> <div class="left-footer"> <h6><a href="https://www.ucloud.cn/"><img src="https://www.ucloud.cn/yun/static/theme/ukd//images/logo.png" alt="UCloud (优刻得科技股份有限公司)"></a></h6> <p>UCloud (优刻得科技股份有限公司)是中立、安全的云计算服务平台,坚持中立,不涉足客户业务领域。公司自主研发IaaS、PaaS、大数据流通平台、AI服务平台等一系列云计算产品,并深入了解互联网、传统企业在不同场景下的业务需求,提供公有云、混合云、私有云、专有云在内的综合性行业解决方案。</p> </div> <div class="right-footer layui-hidemd"> <ul class="flex_box_zd"> <li> <h6>UCloud与云服务</h6> <p><a href="https://www.ucloud.cn/site/about/intro/">公司介绍</a></p> <p><a href="https://zhaopin.ucloud.cn/" >加入我们</a></p> <p><a href="https://www.ucloud.cn/site/ucan/onlineclass/">UCan线上公开课</a></p> <p><a href="https://www.ucloud.cn/site/solutions.html" >行业解决方案</a></p> <p><a href="https://www.ucloud.cn/site/pro-notice/">产品动态</a></p> </li> <li> <h6>友情链接</h6> <p><a href="https://www.surfercloud.com/">SurferCloud</a></p> <p><a href="https://ucloudstack.com/" >私有云</a></p><p><a href="https://pinex.it" >pinex</a></p> <p><a href="https://www.renyucloud.com/" ></a></p> <p><a href="https://www.picpik.ai" >AI Art Generator</a></p> <p><a href="https://www.uwin-link.com" >工厂仿真软件</a></p> </li> <li> <h6>社区栏目</h6> <p><a href="https://www.ucloud.cn/yun/column/index.html">专栏文章</a></p> <p><a href="https://www.ucloud.cn/yun/ask/">专业问答</a></p> <p><a href="https://www.ucloud.cn/yun/kc.html">云学院</a></p> <p><a href="https://www.ucloud.cn/yun/udata/">专题地图</a></p> </li> <li> <h6>常见问题</h6> <p><a href="https://www.ucloud.cn/site/ucsafe/notice.html" >安全中心</a></p> <p><a href="https://www.ucloud.cn/site/about/news/recent/" >新闻动态</a></p> <p><a href="https://www.ucloud.cn/site/about/news/report/">媒体动态</a></p> <p><a href="https://www.ucloud.cn/site/cases.html">客户案例</a></p> <p><a href="https://www.ucloud.cn/site/notice/">公告</a></p> </li> <li> <span><img src="https://static.ucloud.cn/7a4b6983f4b94bcb97380adc5d073865.png" alt="优刻得"></span> <p>扫扫了解更多</p></div> </div> <div class="copyright">Copyright © 2012-2023 UCloud 优刻得科技股份有限公司<i>|</i><a rel="nofollow" href="http://beian.miit.gov.cn/">沪公网安备 31011002000058号</a><i>|</i><a rel="nofollow" href="http://beian.miit.gov.cn/"></a> 沪ICP备12020087号-3</a><i>|</i> <script type="text/javascript" src="https://gyfk12.kuaishang.cn/bs/ks.j?cI=197688&fI=125915" charset="utf-8"></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?290c2650b305fc9fff0dbdcafe48b59d"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-DZSMXQ3P9N"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-DZSMXQ3P9N'); </script> <script> (function(){ var el = document.createElement("script"); el.src = "https://lf1-cdn-tos.bytegoofy.com/goofy/ttzz/push.js?99f50ea166557aed914eb4a66a7a70a4709cbb98a54ecb576877d99556fb4bfc3d72cd14f8a76432df3935ab77ec54f830517b3cb210f7fd334f50ccb772134a"; el.id = "ttzz"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(el, s); })(window) </script></div> </div> </footer> </body> <script src="https://www.ucloud.cn/yun/static/theme/ukd/js/common.js"></script> <<script type="text/javascript"> $(".site-seo-depict *,.site-content-answer-body *,.site-body-depict *").css("max-width","100%"); </script> </html>