H5元素周期表

2023-11-04 07:10
文章标签 元素 h5 周期表

本文主要是介绍H5元素周期表,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

还记得化学上的元素周期表么,现在是前端时代了呢,咱给来了H5周期表学学html5吧~~

先看一下效果喽,还是比较方便的哦~~


吼吼来共享一下代码吧~~

<!DOCTYPE html>
<html><head><meta charset="utf-8" /><title>H5周期表--来自欣欣博客</title><link rel="stylesheet" type="text/css" href="css/style.css"/><script src="js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script><script src="js/labeltable.js"></script></head><body><div class="main"><table><tr><td class="htmlColor">html</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td class="tableColor">col</td><td class="tableColor">table</td></tr><tr><td class="headColor">head</td><td class="inlineColor">span</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td class="blockColor">div</td><td class="formColor">fieldset</td><td class="formColor">form</td><td class="titleColor">body</td><td class="titleColor">h1</td><td class="titleColor">section</td><td class="tableColor">colgroup</td><td class="tableColor">tr</td></tr><tr><td class="headColor">title</td><td class="inlineColor">a</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td class="blockColor">pre</td><td class="formColor">meter</td><td class="formColor">select</td><td class="titleColor">aside</td><td class="titleColor">h2</td><td class="titleColor">header</td><td class="tableColor">caption</td><td class="tableColor">td</td></tr><tr><td class="headColor">meta</td><td class="inlineColor">rt</td><td class="inlineColor">dfn</td><td class="inlineColor">em</td><td class="inlineColor">i</td><td class="inlineColor">small</td><td class="inlineColor">ins</td><td class="inlineColor">s</td><td class="blockColor">br</td><td class="blockColor">p</td><td class="blockColor">blockquote</td><td class="formColor">legend</td><td class="formColor">optgroup</td><td class="titleColor">address</td><td class="titleColor">h3</td><td class="titleColor">nav</td><td class="menuColor">menu</td><td class="tableColor">th</td></tr><tr><td class="headColor">base</td><td class="inlineColor">rp</td><td class="inlineColor">abbr</td><td class="inlineColor">time</td><td class="inlineColor">b</td><td class="inlineColor">strong</td><td class="inlineColor">del</td><td class="inlineColor">kbd</td><td class="blockColor">hr</td><td class="blockColor">ol</td><td class="blockColor">dl</td><td class="formColor">label</td><td class="formColor">option</td><td class="formColor">datalist</td><td class="titleColor">h4</td><td class="titleColor">acticle</td><td class="menuColor">command</td><td class="tableColor">tbody</td></tr><tr><td class="headColor">link</td><td class="headColor">noscript</td><td class="inlineColor">q</td><td class="inlineColor">var</td><td class="inlineColor">sub</td><td class="inlineColor">mark</td><td class="inlineColor">bdi</td><td class="inlineColor">wbr</td><td class="blockColor">figcaption</td><td class="blockColor">ul</td><td class="blockColor">dt</td><td class="formColor">input</td><td class="formColor">output</td><td class="formColor">keygen</td><td class="titleColor">h5</td><td class="titleColor">footer</td><td class="menuColor">summary</td><td class="tableColor">thead</td></tr><tr><td class="headColor">style</td><td class="headColor">script</td><td class="inlineColor">cite</td><td class="inlineColor">samp</td><td class="inlineColor">sup</td><td class="inlineColor">ruby</td><td class="inlineColor">bdo</td><td class="inlineColor">code</td><td class="blockColor">figure</td><td class="blockColor">li</td><td class="blockColor">dd</td><td class="formColor">textarea</td><td class="formColor">button</td><td class="formColor">progress</td><td class="titleColor">h6</td><td class="titleColor">hgroup</td><td class="menuColor">details</td><td class="tableColor">tfoot</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td class="inlineBlockColor">img</td><td class="inlineBlockColor">area</td><td class="inlineBlockColor">map</td><td class="inlineBlockColor">embed</td><td class="inlineBlockColor">object</td><td class="inlineBlockColor">param</td><td class="inlineBlockColor">source</td><td class="inlineBlockColor">iframe</td><td class="inlineBlockColor">canvas</td><td class="inlineBlockColor">track</td><td class="inlineBlockColor">audio</td><td class="inlineBlockColor">video</td></tr></table></div><div class="info"><h3></h3><p></p><a href="###">Mozilla,W3C Reference</a></div><div class="end"><ul><li><span class="htmlColor"></span>根元素</li><li><span class="headColor"></span>元数据和脚本</li><li><span class="inlineBlockColor"></span>嵌入式内容</li></ul><ul><li><span class="inlineColor"></span>文本级别语义</li><li><span class="blockColor"></span>组合内容</li></ul><ul><li><span class="formColor"></span>表单</li><li><span class="titleColor"></span>文档章节</li></ul><ul><li><span class="tableColor"></span>表格数据</li><li><span class="menuColor"></span>交互元素</li></ul></div></body>
</html>

$(function(){var $td = $("td");var $info = $(".info");var data;$.ajax({type:"get",url:"js/elements.json",async:true,success:function(d){data = d;}});$td.mouseenter(function(e){$(this).mousemove(function(e){mousex = e.clientX;mousey = e.clientY;var $tdCont = $(this).text();if($tdCont!= ""){$(this).addClass("active");}for(var attr in data){var title = data[attr].name;if(title == $tdCont){$info.css("display","block");$info.find("h3").html("<"+title+">");$info.find("p").html(data[attr].value);if(mousex > ($(window).width()- $info.width()-10)){$info.offset({left:mousex - $info.width()-10,top:mousey+10})}else{$info.offset({left:mousex +10,top:mousey+10})}}}})})$td.mouseleave(function(){$(this).removeClass("active");$info.hide();})})
json文件:
[
{"name":"html","value":"Document root element.<br>文档根元素","type":"html"},
{"name":"col","value":"Columns in a table.<br>表格中的列","type":"table"},
{"name":"table","value":"Table of multi-dimensional data.<br>表格","type":"table"},
{"name":"head","value":"First element of the HTML document. Contains document metadata.<br>HTML文档中的第一个元素。包含文档元数据","type":"head"},
{"name":"span","value":"Container with no semantic meaning.<br>无语义的容器","type":"inline"},
{"name":"div","value":"Container with no semantic meaning.<br>无语义的容器","type":"block"},
{"name":"fieldset","value":"Set of form controls grouped by theme.<br>按用途组合的一组表单控制元素","type":"form"},
{"name":"form","value":"Form.<br>表单","type":"form"},
{"name":"body","value":"Document content.<br>文档的主体","type":"title"},
{"name":"h1","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"h2","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"h3","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"h4","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"h5","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"h6","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"section","value":"Contains elements grouped by theme, for example a chapter or tab box.<br>包含同主题一组元素的容器,例如文档的章节","type":"title"},
{"name":"colgroup","value":"Defines a group of columns in a table.<br>对表格中的若干列进行组合","type":"table"},
{"name":"tr","value":"A row of cells.<br>表格中的一行单元","type":"table"},
{"name":"title","value":"Document title.<br>文档标题","type":"head"},
{"name":"a","value":"Hyperlink.<br>超链接","type":"inline"},
{"name":"pre","value":"Text that is preformatted in the HTML code.<br>在HTML代码中预先格式化的文本","type":"block"},
{"name":"meter","value":"Control for entering a numeric value in a known range.<br>控制在已知范围内输入度量值","type":"form"},
{"name":"select","value":"Control for selecting from multiple options.<br>有多选值的下拉列表","type":"form"},
{"name":"aside","value":"Content related to surrounding elements that doesn't belong inline, such as a advertising or quotes.<br>与周围元素相关的内容,但分开显示","type":"title"},
{"name":"h","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"header","value":"Navigation or introductory elements for the current section.<br>当前章节的导航或引导性元素","type":"title"},
{"name":"caption","value":"Title of a table.<br>表格的标题","type":"table"},
{"name":"td","value":"Table cell.<br>表格单元格","type":"table"},
{"name":"meta","value":"Document metadata that can't be represented with other elements.<br>文档的元数据","type":"head"},
{"name":"rt","value":"Annotation of preceding text.<br>文本的解释","type":"inline"},
{"name":"dfn","value":"Term being defined by the parent section.<br>由父级章节定义的项","type":"inline"},
{"name":"em","value":"Text that should be emphasised.<br>需要强调的文本","type":"inline"},
{"name":"i","value":"Text in a alternate voice or mood, such as a technical term.<br>斜体的文本","type":"inline"},
{"name":"small","value":"An aside, such as fine print.<br>更小的旁注信息","type":"inline"},
{"name":"ins","value":"Text that has been inserted during document editing.<br>在文档编辑过程中插入的文本","type":"inline"},
{"name":"s","value":"Text that is outdated or no longer accurate.<br>失效或不再准确的文本","type":"inline"},
{"name":"br","value":"Line break.<br>换行符","type":"block"},
{"name":"p","value":"Paragraph content.<br>段落内容","type":"block"},
{"name":"blockquote","value":"Quote from another source.<br>从其它源引用的内容","type":"block"},
{"name":"legend","value":"Define a name for a fieldset.<br>图例或表的说明","type":"form"},
{"name":"optgroup","value":"Group of option.<br>选项组","type":"form"},
{"name":"address","value":"Contact information for the current article.<br>当前文章的联系信息","type":"title"},
{"name":"h","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"nav","value":"Contains a collection of links.<br>导航链接的容器","type":"title"},
{"name":"menu","value":"Set of commands.<br>菜单列表","type":"menu"},
{"name":"th","value":"Table heading.<br>表头","type":"table"},
{"name":"base","value":"Specifies URL which non-absolute URLs are relative to.<br>定义非绝对的链接地址所相对的默认 URL","type":"head"},
{"name":"rp","value":"Contains semantically meaningless markup for browsers that don't understand ruby annotations.<br>针对不支持ruby 注音的浏览器,用于注释信息","type":"inline"},
{"name":"abbr","value":"Abbreviation or acronym.<br>缩写或缩略词","type":"inline"},
{"name":"time","value":"Time defined in a machine readable format.<br>时间","type":"inline"},
{"name":"b","value":"Stylistically separated text of equal importance, such as a product name.<br>粗体文本,用于强调","type":"inline"},
{"name":"strong","value":"Text that is important.<br>重要的文本","type":"inline"},
{"name":"del","value":"Text that has been removed during document editing.<br>在编辑过程中被删除的文本","type":"inline"},
{"name":"kbd","value":"Example input (usually keyboard) for a program.<br>由键盘输入的文本","type":"inline"},
{"name":"hr","value":"Thematic break within a paragraph.<br>水平线/内容主题的变化","type":"block"},
{"name":"ol","value":"Ordered list.<br>有序列表","type":"block"},
{"name":"dl","value":"List of term-description pairs.<br>带定义的列表","type":"block"},
{"name":"label","value":"Caption for a form control.<br>表单控件的标题(标签)","type":"form"},
{"name":"option","value":"Single option within a select control.<br>下拉列表中的单一选项","type":"form"},
{"name":"datalist","value":"Define sets of options.<br>定义选项列表","type":"form"},
{"name":"h","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"article","value":"Section of the page content, such as a blog or forum post.页面内容的独立部分,如博客文章、论坛帖子","type":"title"},
{"name":"command","value":"Command the user can perform, such as publishing an article.<br>用户可以执行的命令,如发表一篇文章","type":"menu"},
{"name":"tbody","value":"Contains rows that hold the table's data.<br>表格主体","type":"table"},
{"name":"link","value":"Other resources related to the document.<br>与文档相关的其它资源","type":"head"},
{"name":"noscript","value":"Contains elements that are part of the document only if scripting is disabled.<br>当脚本被禁用时显示的一部分文档内容","type":"head"},
{"name":"q","value":"Quoted text.<br>引用的文本","type":"inline"},
{"name":"var","value":"Mathematical or programming variable.<br>数学或程序变量","type":"inline"},
{"name":"sub","value":"Subscript text.<br>上标","type":"inline"},
{"name":"mark","value":"Text highlighted for referencing elsewhere.<br>突出显示的文本","type":"inline"},
{"name":"bdi","value":"Text that is separated from directional formatting of its surroundings.<br>从周围内容分开,而设置不同的文本方向","type":"inline"},
{"name":"wbr","value":"Opportunity for a line break.<br>软回车(必要时才回车)","type":"inline"},
{"name":"figcaption","value":"Caption for a figure.<br>图片的标题,图题","type":"block"},
{"name":"ul","value":"Unordered list.<br>无序列表","type":"block"},
{"name":"dt","value":"Term which will be described.<br>带定义的列表中的项目","type":"block"},
{"name":"input","value":"Generic form input.<br>表单中的输入字段","type":"form"},
{"name":"output","value":"Contains the results of a calculation.<br>输出的结果","type":"form"},
{"name":"keygen","value":"Generates private-public key pairs.<br>生成密钥对","type":"form"},
{"name":"h","value":"eading for the current section.<br>当前章节的标题","type":"title"},
{"name":"footer","value":"Footer of the current section.<br>当前章节的页脚","type":"title"},
{"name":"summary","value":"Caption of a details element.<br>dedails元素的标题","type":"menu"},
{"name":"thead","value":"Contains rows with table headings.<br>表格中的表头行","type":"table"},
{"name":"style","value":"Styling defined inline data.<br>在文档中定义的样式","type":"head"},
{"name":"script","value":"Inline or linked client side scripts.<br>内部或外部链接的脚本","type":"head"},
{"name":"cite","value":"Title of a referenced piece of work.<br>对参考文献等的引用","type":"inline"},
{"name":"samp","value":"Sample output of a program.<br>程序的样本","type":"inline"},
{"name":"sup","value":"Superscript text.<br>下标","type":"inline"},
{"name":"ruby","value":"Contains text with annotations, such as pronounciation hints. Commonly used in East Asian text.<br>东亚文字的注音,如中文的拼音","type":"inline"},
{"name":"bdo","value":"Defines directional formatting for content.<br>定义内容的排版方向","type":"inline"},
{"name":"code","value":"Fragment of code.<br>代码的片断","type":"inline"},
{"name":"figure","value":"Contains elements related to single concept, such as an illustration or code example.<br>独立的内容,如图像、代码等","type":"block"},
{"name":"li","value":"List item.<br>列表项目","type":"block"},
{"name":"dd","value":"Description for the preceding term.<br>带定义列表中对项目的描述","type":"block"},
{"name":"textarea","value":"Multiline free-form text input.<br>多行的文本输入区域","type":"form"},
{"name":"button","value":"A button.<br>按钮","type":"form"},
{"name":"progress","value":"Control for displaying progress of a task.<br>运行中的进度控制","type":"form"},
{"name":"h","value":"Heading for the current section.<br>当前章节的标题","type":"title"},
{"name":"hgroup","value":"Collection of headings for the current section. The highest ranked heading represents the group in the document outline.<br>当前章节各标题的组合","type":"title"},
{"name":"details","value":"Contains additional information, such as the contents of an accordian view.<br>附加的详细信息","type":"menu"},
{"name":"tfoot","value":"Contains rows with summary of data.<br>表格的页脚/脚注行","type":"table"},
{"name":"img","value":"An image.<br>图像","type":"inlineBlock"},
{"name":"area","value":"Hyperlink area in an image map.<br>图像映射的超链接区域","type":"inlineBlock"},
{"name":"map","value":"Image map for adding hyperlinks to parts of an image.<br>在图像的一部分区域定义图像映射用于添加超链接","type":"inlineBlock"},
{"name":"embed","value":"Reference to non-HTML content.<br>嵌入的非HTML内容","type":"inlineBlock"},
{"name":"object","value":"External resource such as an image, iframe or plugin.<br>嵌入的外部资源,如图像、iframe或插件","type":"inlineBlock"},
{"name":"param","value":"Parameters for the parent object.<br>父级对象的参数","type":"inlineBlock"},
{"name":"source","value":"Alternative sources for parent video or audio elements.<br>父级视频或音频元素的资源","type":"inlineBlock"},
{"name":"iframe","value":"Nested browser frame.<br>嵌套的框架","type":"inlineBlock"},
{"name":"canvas","value":"Bitmap which is editable by client side scripts.<br>可以通过客户端脚本编辑的图形(画布)","type":"inlineBlock"},
{"name":"track","value":"Specifies external timing track for media elements.<br>媒体类元素的外部轨道","type":"inlineBlock"},
{"name":"audio","value":"Audio file.<br>音频文件","type":"inlineBlock"},
{"name":"video","value":"Video.<br>视频","type":"inlineBlock"}
]


scss

$labelWidth:52px;
$fontSize:12px;$htmlColor:#81d183;
$headColor:#6575d3;
$inlineColor:#d1d157;
$blockColor:#d17d47;
$formColor:#55d157;
$titleColor:#8591d3;
$tableColor:#d17d57;
$menuColor:#d1d1d3;
$inlineBlockColor:#d17dd3;html{font-family: "microsoft yahei";
}
body{width: 100%;height:100%;overflow: hidden;background:#1C1D26;
}
li{list-style: none;color: #fff;}
.main{margin:50px 0;
}
.active{opacity: 1;box-shadow: 1px 1px 5px  #fff ;
}
a{text-decoration: none;color:#FF8215 ;
}
.info{background:#fff;box-shadow: 1px 1px 5px #000;width: auto;float: left;padding: 10px;border-radius: 10px;position: absolute;display: none;
}
table{border: 0;margin: 0 auto;tr{td{width:$labelWidth;height:$labelWidth;border-radius: 10px;text-align: center;border:none;font-size: $fontSize;word-break: break-all;opacity: 0.7;position: relative;}}
}.htmlColor{background:$htmlColor;
}
.tableColor{background:$tableColor;
}
.headColor{background: $headColor;
}
.inlineColor{background:$inlineColor;
}
.titleColor{background:$titleColor;
}
.blockColor{background: $blockColor;
}
.formColor{background: $formColor;
}
.menuColor{background: $menuColor;
}
.inlineBlockColor{background: $inlineBlockColor;
}.end{margin-top:100px;ul{float: left;margin-right: 100px;li{height:30px;span{display: block;width:20px;height:20px;border-radius: 2px;float:left;margin-right: 10px;}}}
}

ok~~完工

这篇关于H5元素周期表的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/344112

相关文章

EasyPlayer.js网页H5 Web js播放器能力合集

最近遇到一个需求,要求做一款播放器,发现能力上跟EasyPlayer.js基本一致,满足要求: 需求 功性能 分类 需求描述 功能 预览 分屏模式 单分屏(单屏/全屏) 多分屏(2*2) 多分屏(3*3) 多分屏(4*4) 播放控制 播放(单个或全部) 暂停(暂停时展示最后一帧画面) 停止(单个或全部) 声音控制(开关/音量调节) 主辅码流切换 辅助功能 屏

遮罩,在指定元素上进行遮罩

废话不多说,直接上代码: ps:依赖 jquer.js 1.首先,定义一个 Overlay.js  代码如下: /*遮罩 Overlay js 对象*/function Overlay(options){//{targetId:'',viewHtml:'',viewWidth:'',viewHeight:''}try{this.state=false;//遮罩状态 true 激活,f

学习记录:js算法(二十八):删除排序链表中的重复元素、删除排序链表中的重复元素II

文章目录 删除排序链表中的重复元素我的思路解法一:循环解法二:递归 网上思路 删除排序链表中的重复元素 II我的思路网上思路 总结 删除排序链表中的重复元素 给定一个已排序的链表的头 head , 删除所有重复的元素,使每个元素只出现一次 。返回 已排序的链表 。 图一 图二 示例 1:(图一)输入:head = [1,1,2]输出:[1,2]示例 2:(图

JS和jQuery获取节点的兄弟,父级,子级元素

原文转自http://blog.csdn.net/duanshuyong/article/details/7562423 先说一下JS的获取方法,其要比JQUERY的方法麻烦很多,后面以JQUERY的方法作对比。 JS的方法会比JQUERY麻烦很多,主要则是因为FF浏览器,FF浏览器会把你的换行也当最DOM元素。 <div id="test"><div></div><div></div

H5漂流瓶社交系统源码

一个非常有创意的H5漂流瓶社交系统源码,带完整前端h5和后台管理系统。 环境:Nginx 1.20.1-MySQL 5.6.50-PHP-7.3 代码下载

力扣第347题 前K个高频元素

前言 记录一下刷题历程 力扣第347题 前K个高频元素 前K个高频元素 原题目: 分析 我们首先使用哈希表来统计数字出现的频率,然后我们使用一个桶排序。我们首先定义一个长度为n+1的数组,对于下图这个示例就是长度为7的数组。为什么需要一个长度为n+1的数组呢?假如说总共有三个数字都为1,那么我们需要把这个1放在数组下标为3的位置,假如说数组长度为n,对于这个例子就是长度为3,那么它的

QML入门之基本元素

元素分为可视元素与非可视元素,可能元素例如Rectangle、Button等。非可视元素如Timer(定时器)、MouseArea(鼠标区域)等。非可视元素一般用于操作可视元素。 基础元素 Item Item(基础元素对象)是所有可视元素的基础对象,它们都继承自Item。可是元素存在以下共有属性。 Group(分组)Properties(属性)Geometry(几何属性)x

【CSS in Depth 2 精译_024】4.2 弹性子元素的大小

当前内容所在位置(可进入专栏查看其他译好的章节内容) 第一章 层叠、优先级与继承(已完结) 1.1 层叠1.2 继承1.3 特殊值1.4 简写属性1.5 CSS 渐进式增强技术1.6 本章小结 第二章 相对单位(已完结) 2.1 相对单位的威力2.2 em 与 rem2.3 告别像素思维2.4 视口的相对单位2.5 无单位的数值与行高2.6 自定义属性2.7 本章小结 第三章 文档流与盒模型(已

17 通过ref代替DOM用来获取元素和组件的引用

重点 ref :官网给出的解释是: ref: 用于注册对元素或子组件的引用。引用将在父组件的$refs 对象下注册。如果在普通DOM元素上使用,则引用将是该元素;如果在子组件上使用,则引用将是组件实例: <!-- vm.$refs.p will be the DOM node --><p ref="p">hello</p><!-- vm.$refs.child will be the c

react笔记 8-19 事件对象、获取dom元素、双向绑定

1、事件对象event 通过事件的event对象获取它的dom元素 run=(event)=>{event.target.style="background:yellowgreen" //event的父级为他本身event.target.getAttribute("aid") //这样便获取到了它的自定义属性aid}render() {return (<div><h2>{