html5学习-<area>标签

本文详细介绍了HTML中&lt;area&gt;标签的使用方法,包括如何定义图像映射中的不同形状区域及其坐标设置,适用于创建交互式的图像链接。

定义和用法  <area> 标签定义图像映射中的区域。

<img src ="planets.gif" alt="Planets" usemap ="#planetmap" />
 <map id ="planetmap">
   <area shape ="rect" coords ="0,0,82,126" href ="sun.htm" alt="Sun" />
   <area shape ="circle" coords ="90,58,3" href ="mercur.htm" alt="Mercury" />
   <area shape ="circle" coords ="124,58,8" href ="venus.htm" alt="Venus" />
</map>

shape:规定区域的形状。
 1.circle: 圆形
 2.polygon:多边形
 3.rectangle:四边形

coords: 定义可点击区域的坐标。
 1.shape:circle; coords='x,y,z'; x,y指定圆心的位置,z以像素为单位的圆形半径
 2.shape:polygon; coords="x1,y1,x2,y2,x3,y3,..." 每一对 "x,y" 坐标都定义了多边形的一个顶点("0,0" 是图像左上角的坐标)。定义三角形至少需要三组坐标;高纬多边   形则需要更多数量的顶点。多边形会自动封闭,因此在列表的结尾不需要重复第一个坐标来闭合整个区域。
 3.shape="rectangle",coords="x1,y1,x2,y2" 第一个坐标是矩形的一个角(左上角)的顶点坐标,另一个坐标是对角(右下角)的坐标

 注意:
   如果某个 area 标签中的坐标和其他区域发生了重叠,会优先采用最先出现的 area 标签。浏览器会忽略超过图像边界范围之外的坐标。

# 荷花探秘手册 - 跨学科暑假实践指南 下面是一个美观大气、符合五年级学生认知特点的HTML页面,以"荷花探秘手册"为主题,融合多学科知识: ```html <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>荷花探秘手册 - 五年级暑假作业</title> <style> :root { --primary: #e91e63; --secondary: #4caf50; --accent: #2196f3; --light: #f8f9fa; --dark: #333; --pink-light: #fce4ec; --green-light: #e8f5e9; --blue-light: #e3f2fd; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Comic Sans MS', 'Marker Felt', '微软雅黑', sans-serif; line-height: 1.6; color: var(--dark); background: linear-gradient(to bottom, var(--pink-light), var(--green-light)); padding: 20px; } .container { max-width: 900px; margin: 0 auto; background-color: white; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); overflow: hidden; border: 2px solid var(--secondary); } header { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; text-align: center; padding: 30px 20px; position: relative; overflow: hidden; } .lotus-banner { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.2; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="white" d="M50,15 C58,5 72,5 80,15 C88,25 85,40 75,45 C65,50 50,55 35,50 C25,45 22,30 30,20 C38,10 42,5 50,15 Z M30,30 C35,25 45,25 50,30 C55,35 50,45 45,50 C40,55 30,50 25,45 C20,40 25,35 30,30 Z"/></svg>'); background-size: 100px; } h1 { font-size: 2.8rem; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); position: relative; } .subtitle { font-size: 1.5rem; margin-bottom: 20px; position: relative; } .student-info { background: rgba(255,255,255,0.2); padding: 15px; border-radius: 10px; display: inline-block; margin-top: 20px; backdrop-filter: blur(5px); position: relative; } .page { padding: 30px; border-bottom: 2px dashed var(--secondary); } .page-title { color: var(--primary); font-size: 1.8rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 3px dotted var(--accent); display: flex; align-items: center; } .page-title::before { content: "✿"; margin-right: 10px; font-size: 1.5rem; } .subject-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.85rem; margin-right: 8px; color: white; } .chinese-badge { background: #f44336; } .math-badge { background: #2196f3; } .english-badge { background: #9c27b0; } .science-badge { background: #4caf50; } .art-badge { background: #ff9800; } .task-card { background: var(--light); border-radius: 12px; padding: 20px; margin: 20px 0; box-shadow: 0 4px 8px rgba(0,0,0,0.08); border-left: 5px solid var(--primary); position: relative; overflow: hidden; } .task-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, var(--primary), var(--secondary)); } .task-title { font-size: 1.4rem; color: var(--primary); margin-bottom: 15px; } .task-content { padding: 10px; } ul.task-steps { padding-left: 25px; margin: 15px 0; } ul.task-steps li { margin-bottom: 10px; position: relative; } ul.task-steps li::before { content: "→"; position: absolute; left: -20px; color: var(--secondary); } .extension { background: var(--green-light); border-radius: 8px; padding: 15px; margin-top: 15px; border: 1px dashed var(--secondary); } .extension-title { font-weight: bold; color: var(--secondary); margin-bottom: 8px; } table { width: 100%; border-collapse: collapse; margin: 15px 0; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } th { background: var(--secondary); color: white; padding: 12px; text-align: left; } td { padding: 10px; border-bottom: 1px solid #eee; } tr:nth-child(even) { background: var(--pink-light); } .visual-guide { display: flex; flex-wrap: wrap; gap: 15px; margin: 20px 0; } .visual-item { flex: 1; min-width: 200px; background: var(--blue-light); border-radius: 10px; padding: 15px; text-align: center; box-shadow: 0 3px 6px rgba(0,0,0,0.1); } .visual-item i { font-size: 2.5rem; color: var(--primary); display: block; margin-bottom: 10px; } .interactive-element { background: #fffde7; border: 2px solid #ffd600; border-radius: 10px; padding: 15px; margin: 20px 0; text-align: center; } .stamp-area { display: flex; justify-content: space-around; margin: 30px 0; } .stamp { width: 70px; height: 70px; border: 3px dashed #9e9e9e; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: #9e9e9e; text-align: center; } footer { background: var(--dark); color: white; text-align: center; padding: 20px; font-size: 0.9rem; } .tips-box { background: #e3f2fd; border-radius: 10px; padding: 15px; margin: 20px 0; border-left: 4px solid var(--accent); } @media print { body { background: white; padding: 0; } .container { box-shadow: none; border: none; } .page { page-break-inside: avoid; } } /* 装饰元素 */ .decoration { position: absolute; z-index: 0; opacity: 0.1; pointer-events: none; } .lotus-1 { top: 10%; left: 5%; font-size: 120px; transform: rotate(15deg); } .lotus-2 { bottom: 15%; right: 7%; font-size: 100px; transform: rotate(-10deg); } .leaf { bottom: 30%; left: 8%; font-size: 150px; transform: rotate(-25deg); } </style> </head> <body> <div class="container"> <!-- 装饰元素 --> <div class="decoration lotus-1">✿</div> <div class="decoration lotus-2">✿</div> <div class="decoration leaf">❦</div> <header> <div class="lotus-banner"></div> <h1>「荷」你探秘</h1> <div class="subtitle">五年级跨学科暑假实践手册</div> <div class="student-info"> <p>姓名:________________</p> <p>班级:________________</p> <p>日期:2025年7月1日 - 8月31日</p> </div> </header> <div class="page"> <h2 class="page-title">荷花王国通行证</h2> <div class="task-card"> <h3 class="task-title">我的探索问题</h3> <div class="task-content"> <p>在开始荷花探秘之前,请写下你最想了解的3个问题:</p> <ul class="task-steps"> <li>1. ________________________________________</li> <li>2. ________________________________________</li> <li>3. ________________________________________</li> </ul> </div> <div class="extension"> <div class="extension-title">学科印章收集区</div> <p>完成每周任务后,收集对应的学科印章:</p> <div class="stamp-area"> <div class="stamp">语文<br>印章</div> <div class="stamp">数学<br>印章</div> <div class="stamp">英语<br>印章</div> <div class="stamp">科学<br>印章</div> <div class="stamp">美术<br>印章</div> </div> </div> </div> <div class="tips-box"> <h3>探索小贴士:</h3> <p>荷花又称莲花、水芙蓉,是多年生水生植物。它在中国文化中象征着纯洁和高雅,许多诗人都曾为荷花写下优美的诗句。</p> </div> </div> <div class="page"> <h2 class="page-title">第一周:观察家笔记 <span class="subject-badge chinese-badge">语文</span> <span class="subject-badge science-badge">科学</span></h2> <div class="task-card"> <h3 class="task-title">任务一:古诗荷花解码器</h3> <div class="task-content"> <p><strong>活动内容:</strong></p> <ul class="task-steps"> <li>背诵并赏析《小池》(杨万里)和《晓出净慈寺送林子方》</li> <li>用思维导图分析诗中荷花意象</li> <li>在诗中圈出描写荷花生长环境的词语</li> </ul> <div class="extension"> <div class="extension-title">科学延伸</div> <p>根据古诗内容,填写荷花生长需求表:</p> <table> <thead> <tr> <th>生长需求</th> <th>古诗证据</th> <th>科学原理</th> </tr> </thead> <tbody> <tr> <td>光照</td> <td>"映日荷花别样红"</td> <td>植物光合作用需要________</td> </tr> <tr> <td>水分</td> <td>"小荷才露尖尖角"</td> <td>水生植物需要________</td> </tr> <tr> <td>土壤</td> <td>"出淤泥而不染"</td> <td>荷花根部从淤泥中吸收________</td> </tr> </tbody> </table> </div> </div> </div> <div class="task-card"> <h3 class="task-title">任务二:荷花成长日志</h3> <div class="task-content"> <p><strong>活动内容:</strong></p> <ul class="task-steps"> <li>种植碗莲或观察小区池塘的荷花</li> <li>记录每日变化(高度、叶片数等)</li> <li>绘制荷花生长过程插图</li> </ul> <table> <thead> <tr> <th>日期</th> <th>株高(cm)</th> <th>新叶片数</th> <th>观察记录(文字/绘图)</th> </tr> </thead> <tbody> <tr> <td>7/1</td> <td>5.0</td> <td>1</td> <td>________________________________</td> </tr> <tr> <td>7/2</td> <td>6.2</td> <td>1</td> <td>________________________________</td> </tr> <tr> <td>7/3</td> <td>7.5</td> <td>2</td> <td>________________________________</td> </tr> <tr> <td colspan="4" style="text-align: center;">...继续记录至7/7</td> </tr> </tbody> </table> <div class="extension"> <div class="extension-title">数学延伸</div> <p>计算荷花周平均生长速度:</p> <p>(最高值 ______ - 最低值 ______) ÷ 7 = ______ cm/天</p> <p>在下方绘制荷叶形状的生长折线图:</p> <div class="interactive-element"> <p>[ 折线图绘制区 ]</p> </div> </div> </div> </div> </div> <div class="page"> <h2 class="page-title">第二周:数据小侦探 <span class="subject-badge math-badge">数学</span> <span class="subject-badge english-badge">英语</span></h2> <div class="task-card"> <h3 class="task-title">任务三:荷花空间规划</h3> <div class="task-content"> <p><strong>活动内容:</strong></p> <ul class="task-steps"> <li>测量家中水盆或池塘的直径和水深</li> <li>计算适合种植的荷花数量(每株需0.5㎡空间)</li> <li>绘制荷花种植规划图</li> </ul> <div class="visual-guide"> <div class="visual-item"> <i>①</i> <p>测量水盆直径:______ cm</p> </div> <div class="visual-item"> <i>②</i> <p>计算半径:______ ÷ 2 = ______ m</p> </div> <div class="visual-item"> <i>③</i> <p>计算水面面积:3.14 × 半径² = ______ ㎡</p> </div> <div class="visual-item"> <i>④</i> <p>可种荷花数:面积 ÷ 0.5 = ______ 株</p> </div> </div> <div class="extension"> <div class="extension-title">英语延伸</div> <p>用3-5句英文描述你的测量过程:</p> <p>1. _______________________________________________________</p> <p>2. _______________________________________________________</p> <p>3. _______________________________________________________</p> </div> </div> </div> <div class="task-card"> <h3 class="task-title">任务四:荷花单词工坊</h3> <div class="task-content"> <p><strong>活动内容:</strong></p> <ul class="task-steps"> <li>制作荷花结构中英双语卡片</li> <li>标注英文名词的单复数形式</li> <li>用荷花单词编3个英文句子</li> </ul> <div class="interactive-element"> <h4>荷花结构双语卡片</h4> <table> <thead> <tr> <th>中文名称</th> <th>英文名称</th> <th>复数形式</th> <th>图示</th> </tr> </thead> <tbody> <tr> <td>花瓣</td> <td>petal</td> <td>petals</td> <td>[图]</td> </tr> <tr> <td>茎</td> <td>stem</td> <td>stems</td> <td>[图]</td> </tr> <tr> <td>根</td> <td>root</td> <td>roots</td> <td>[图]</td> </tr> <tr> <td>荷叶</td> <td>lotus leaf</td> <td>lotus leaves</td> <td>[图]</td> </tr> <tr> <td>莲蓬</td> <td>lotus seedpod</td> <td>lotus seedpods</td> <td>[图]</td> </tr> </tbody> </table> </div> </div> </div> </div> <div class="page"> <h2 class="page-title">第三周:创意实验室 <span class="subject-badge science-badge">科学</span> <span class="subject-badge art-badge">美术</span></h2> <div class="task-card"> <h3 class="task-title">任务五:荷叶超能力实验</h3> <div class="task-content"> <p><strong>活动内容:</strong></p> <ul class="task-steps"> <li>准备荷叶和普通树叶各一片</li> <li>在两种叶子上滴等量水滴,观察现象</li> <li>拍照记录实验过程</li> <li>解释"疏水性"科学原理</li> </ul> <div class="visual-guide"> <div class="visual-item"> <i>💧</i> <p>荷叶水滴:保持珠状</p> </div> <div class="visual-item"> <i>💧</i> <p>普通树叶:扩散成水渍</p> </div> </div> <div class="extension"> <div class="extension-title">实验报告</div> <p><strong>现象:</strong>荷叶具有______性</p> <p><strong>原理:</strong>荷叶表面有______结构</p> <p><strong>应用:</strong>仿生学应用如______</p> </div> </div> </div> <div class="task-card"> <h3 class="task-title">任务六:防水艺术工场</h3> <div class="task-content"> <p><strong>活动内容:</strong></p> <ul class="task-steps"> <li>用蜡笔+水彩技法模拟荷叶防水效果</li> <li>创作一幅"雨中的荷花"作品</li> <li>编写作品说明卡</li> </ul> <div class="extension"> <div class="extension-title">创作步骤</div> <ol> <li>用白色蜡笔在纸上画出水珠轮廓和荷花图案</li> <li>用淡绿色水彩刷背景</li> <li>观察蜡笔区域神奇地"防水"效果</li> <li>添加粉色水彩绘制荷花</li> </ol> </div> <div class="interactive-element"> <h4>我的作品展示区</h4> <p>[粘贴作品照片或直接绘制]</p> </div> </div> </div> </div> <div class="page"> <h2 class="page-title">第四周:成果博览会 <span class="subject-badge chinese-badge">语文</span> <span class="subject-badge math-badge">数学</span> <span class="subject-badge english-badge">英语</span> <span class="subject-badge science-badge">科学</span></h2> <div class="task-card"> <h3 class="task-title">任务七:荷花主题手抄报</h3> <div class="task-content"> <p><strong>活动内容:</strong>整合四周学习成果,制作一份荷花主题手抄报</p> <div class="visual-guide"> <div class="visual-item"> <i>文</i> <p>语文区:原创荷花小诗</p> </div> <div class="visual-item"> <i>数</i> <p>数学区:生长速度图表</p> </div> <div class="visual-item"> <i>英</i> <p>英语区:荷花趣味故事</p> </div> <div class="visual-item"> <i>科</i> <p>科学区:防水实验照片</p> </div> </div> <div class="extension"> <div class="extension-title">英语故事素材箱</div> <p><strong>标题:</strong>The Frog on the Lily Pad</p> <p><strong>关键词:</strong>lily pad (荷叶), hungry frog, buzzing fly, splash, jump</p> <p>_______________________________________________________</p> <p>_______________________________________________________</p> </div> </div> </div> <div class="task-card"> <h3 class="task-title">任务八:家庭荷花展</h3> <div class="task-content"> <p><strong>活动内容:</strong>向家人展示你的学习成果</p> <div class="interactive-element"> <h4>展示准备清单</h4> <ul> <li>□ 种植的碗莲或观察记录</li> <li>□ 荷花主题手抄报</li> <li>□ 防水艺术画作品</li> <li>□ 荷花单词卡片</li> <li>□ 实验照片和报告</li> </ul> </div> <div class="extension"> <div class="extension-title">演讲手卡模板</div> <p><strong>语文:</strong>我创作的荷花小诗表达了______的情感。</p> <p><strong>数学:</strong>通过测量计算,我发现______。</p> <p><strong>英语:</strong>我最喜欢的荷花单词是______,因为______。</p> <p><strong>科学:</strong>荷叶防水实验让我明白了______。</p> </div> </div> </div> </div> <div class="page"> <h2 class="page-title">我的荷花宝藏袋</h2> <div class="task-card"> <div class="task-content"> <p>恭喜你完成了荷花探秘之旅!请整理并收藏你的学习成果:</p> <div class="visual-guide"> <div class="visual-item"> <i>📝</i> <p>实验记录和报告</p> </div> <div class="visual-item"> <i>🎨</i> <p>美术作品</p> </div> <div class="visual-item"> <i>📊</i> <p>数据图表</p> </div> <div class="visual-item"> <i>📷</i> <p>观察照片</p> </div> </div> <div class="tips-box"> <h3>收纳小贴士:</h3> <ul> <li>使用文件袋或文件夹分类保存各学科成果</li> <li>为作品制作标签,注明日期和内容</li> <li>将单词卡片用圆环串起来方便复习</li> <li>在手册封底制作一个收纳袋存放小件物品</li> </ul> </div> <div class="interactive-element"> <h4>我的探秘心得</h4> <p>在这次荷花主题学习中,我最大的收获是:</p> <p>_______________________________________________________</p> <p>_______________________________________________________</p> </div> </div> </div> </div> <footer> <p>《荷花探秘手册》五年级跨学科暑假实践指南</p> <p>设计理念:观察 → 测量 → 实验 → 创造 → 展示</p> <p>© 2025 五年级暑假作业 - 融合语文、数学、英语、科学、美术多学科知识</p> </footer> </div> </body> </html> ``` ## 设计特点 1. **美观大气的荷花主题设计**: - 采用粉色和绿色作为主色调,象征荷花与荷叶 - 荷花元素作为装饰贯穿整个页面 - 清新自然的配色方案符合五年级学生的审美 2. **多学科融合结构**: - 四周学习计划清晰划分 - 每项任务明确标注融合的学科 - 学科知识自然衔接,形成完整学习闭环 3. **符合五年级认知特点**: - 字体清晰易读(Comic Sans MS和微软雅黑) - 任务说明简洁明了 - 互动元素激发学习兴趣 - 图文并茂,视觉引导清晰 4. **实用功能设计**: - 印章收集区增强成就感 - 数据记录表格方便实践 - 互动元素鼓励动手参与 - 打印友好的页面设计 5. **专业教育理念融入**: - 观察 → 测量 → 实验 → 创造 → 展示的完整探究流程 - 每项任务包含学科延伸内容 - 科学实验与艺术创作结合 这个HTML页面可以直接在浏览器中打开使用,也可以打印成手册形式,完美满足五年级暑假作业的需求。
06-18
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>音乐主题网页</title> <link rel="shortcut icon"href="images/音乐图标.jpg"/> <style> body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 1000px; margin: 0 auto; padding: 20px; background-color: #f8f9fa; color: #333; line-height: 1.6; } header { text-align: center; padding: 30px 0; background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); color: white; border-radius: 10px; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); } h1 { font-size: 2.8rem; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); } h2 { color: #2575fc; border-bottom: 2px solid #2575fc; padding-bottom: 8px; margin-top: 30px; } section { background: white; padding: 25px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); margin-bottom: 25px; } .music-info { display: flex; gap: 30px; margin: 25px 0; } .music-player { flex: 1; } .media-container { background: #f0f4ff; padding: 20px; border-radius: 8px; margin: 20px 0; } audio, video { width: 100%; border-radius: 8px; background: white; } figure { margin: 25px 0; text-align: center; } img { max-width: 100%; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); transition: transform 0.3s ease; } img:hover { transform: scale(1.02); } figcaption { font-style: italic; color: #666; margin-top: 10px; } ul, ol { padding-left: 25px; margin: 15px 0; } li { margin-bottom: 10px; } dt { font-weight: bold; color: #2575fc; margin-top: 15px; } dd { margin-left: 20px; margin-bottom: 15px; } footer { text-align: center; padding: 20px; color: #666; font-size: 0.9rem; } .highlight { background-color: #eef7ff; padding: 15px; border-left: 4px solid #2575fc; border-radius: 0 8px 8px 0; margin: 20px 0; } </style> </head> <body> <header> <h1><i class="fas fa-music"></i> 沉浸式音乐体验</h1> <p>探索声音的艺术世界</p > </header> <section id="intro"> <h2>音乐的力量</h2> <p>音乐是人类情感最直接的表达方式,它能跨越语言障碍,触动心灵深处。从古典到现代,从民族到电子,每一种音乐风格都有其独特的魅力。</p > <div class="highlight"> <p>"没有音乐,生活将是一个错误" — 弗里德里希·尼采</p > </div> <figure> < img src="images/音乐会.jpg" alt="音乐会现场图片"> <figcaption>图:充满激情的现场音乐表演</figcaption> </figure> </section> <section id="featured-music"> <h2>本日推荐</h2> <div class="music-info"> <div class="music-player"> <h3>《我用什么把你留住》</h3> <p>是福禄寿FloruitShow创作的一首关于生命、失去与珍惜的哲思之作。</p > <p>“在这浩瀚星河你是什么</p > <p>在她温柔眼眸的你是什么</p > <p>闪着光坠落 又依依不舍</p > <p>所以生命啊 它璀璨如歌</p > <p>你一定要看到花开</p > <p>你一定等燕子归来</p > <p>想着它们都会回来</p > <p>你誓死为了这些而存在”</p > <div class="media-container"> <audio src="music/我用什么把你留住.mp3" controls> <source src="music/我用什么把你留住.mp3" type="audio/mpeg"> 您的浏览器不支持音频元素 </audio> </div> </div> <div class="music-player"> <h3>《雪人》</h3> <p>由新锐音乐人驼儿创作,融合电子与说唱元素,带你进入梦幻般的音乐旅程。</p > <p>“来年再见吧雪人 现在这骄阳太旺了</p > <p>等来年都装上嘴唇、鱼尾纹和下巴</p > <p>一期一会喽雪人 我会陪你一起融化的</p > <p>我们把这寒冷忘了</p > <p>让我们把这寒冷都忘了”</p > <div class="media-container"> <video src="shipin/雪人视频.mp4"controls> <source src="【2116 《雪人》-驼儿】https://www.bilibili.com/video/BV1W4XPYxExC?vd_source=dadd11e03a268117e18a56aaf18bcf9e" type="video/mp4"> 您的浏览器不支持视频元素 </video> </div> </div> </div> </section> <section id="music-lists"> <h2>音乐分类</h2> <div class="music-info"> <div class="music-categories"> <h3>热门音乐类型</h3> <ul> <li>流行音乐</li> <li>摇滚乐</li> <li>电子舞曲</li> <li>古典音乐</li> <li>爵士乐</li> </ul> </div> </div> <div class="music-chart"> <h3>本周排行榜</h3> <ol> <li>《恋人》</li> <li>《两难》</li> <li>《Star Crossing Night》</li> <li>《唯一》</li> <li>《爱情讯息》</li> </ol> </div> </div> </div> <h3>音乐术语词典</h3> <dl> <dt>和弦 (Chord)</dt> <dd>三个或更多不同音高的音符同时发声</dd> <dt>节奏 (Rhythm)</dt> <dd>音乐中时间组织的模式,包括节拍和节奏型</dd> <dt>音色 (Timbre)</dt> <dd>声音的品质特征,使不同乐器演奏相同音符时产生区别</dd> </dl> </div> </section> <section id="resources"> <h2>音乐学习资源</h2> <ul> <li>在线音乐课程平台</li> <li>乐器选购指南</li> <li>音乐制作软件推荐</li> <li>本地音乐工作坊信息</li> </ul> </section> <footer> <p>© 2025 沉浸式音乐体验 | 使用HTML5技术构建</p > <p>视频来源:哔哩哔哩 | 音频来源:网易云音乐</p > </footer> </body> </html> 在该代码的基础上用HBuilder X编写一个页面,要求如下:超链接:常见的超链接类型有网站链接、图像链接、下载链接、锚点链接、电子邮件链接和图像热点链接等。至少使用四种。表格:使用标签<table>、<tr>和<td>标记一个最基本的表格结构。还需要使用跨行和跨列标签。表单:在 HTML5 中,使用<form>标签创建一个表单,使用<input />标签、<textarea>标签、<option>标签等不同的表单控件(至少使用五种,input标签就有十几种),使用<label>标签标记提示信息,使用<fieldset>标签为表单对象分组。给我生成一个完整的代码
10-14
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>简洁二级表头(对齐版)</title> <style type="text/css"> .gridview { width: 100%; } .inner-table { width: 100%; border-collapse: collapse; } .inner-table th, .inner-table td { border: 1px solid #000; padding: 4px; text-align: center; } </style> </head> <body> <form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False" ShowHeader="true"> <Columns> <asp:TemplateField> <HeaderTemplate> <table class="inner-table"> <tr> <!-- 基础列:3列(跨2行) --> <th rowspan="2">Plant</th> <th rowspan="2">Dept</th> <th rowspan="2">Area</th> <!-- From HR:3列 --> <th colspan="3">From HR(2025-11-13)</th> <!-- Loading:6列 --> <th colspan="6">Loading</th> <!-- HC:6列 --> <th colspan="6">HC</th> <!-- OT:6列 --> <th colspan="6">OT</th> </tr> <tr> <!-- From HR 子列(3列) --> <th>Contract_worker</th> <th>Leased_worker</th> <th>TotalWorker</th> <!-- Loading 子列(6列) --> <th>2025-11</th> <th>2025-12</th> <th>2026-01</th> <th>2026-02</th> <th>2026-03</th> <th>2026-04</th> <!-- HC 子列(6列) --> <th>2025-11</th> <th>2025-12</th> <th>2026-01</th> <th>2026-02</th> <th>2026-03</th> <th>2026-04</th> <!-- OT 子列(6列) --> <th>2025-11</th> <th>2025-12</th> <th>2026-01</th> <th>2026-02</th> <th>2026-03</th> <th>2026-04</th> </tr> </table> </HeaderTemplate> <ItemTemplate> <table class="inner-table"> <tr> <!-- 基础列(3列):与表头对应 --> <td><%# Eval("Plant") %></td> <td><%# Eval("Dept") %></td> <td><%# Eval("Area") %></td> <!-- From HR 数据(3列):与表头子列顺序一致 --> <td><%# Eval("Contract_worker") %></td> <td><%# Eval("Leased_worker") %></td> <td><%# Eval("TotalWorker") %></td> <!-- Loading 数据(6列):与时间顺序一致 --> <td><%# Eval("Loading_202511", "{0:P1}") %></td> <td><%# Eval("Loading_202512", "{0:P1}") %></td> <td><%# Eval("Loading_202601", "{0:P1}") %></td> <td><%# Eval("Loading_202602", "{0:P1}") %></td> <td><%# Eval("Loading_202603", "{0:P1}") %></td> <td><%# Eval("Loading_202604", "{0:P1}") %></td> <!-- HC 数据(6列):与时间顺序一致 --> <td><%# Eval("HC_202511") %></td> <td><%# Eval("HC_202512") %></td> <td><%# Eval("HC_202601") %></td> <td><%# Eval("HC_202602") %></td> <td><%# Eval("HC_202603") %></td> <td><%# Eval("HC_202604") %></td> <!-- OT 数据(6列):与时间顺序一致 --> <td><%# Eval("OT_202511") %></td> <td><%# Eval("OT_202512") %></td> <td><%# Eval("OT_202601") %></td> <td><%# Eval("OT_202602") %></td> <td><%# Eval("OT_202603") %></td> <td><%# Eval("OT_202604") %></td> </tr> </table> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </div> </form> </body> </html>
最新发布
11-20
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>音乐主题网页</title> <link rel="shortcut icon" href="images/音乐图标.jpg"/> <style> body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 1000px; margin: 0 auto; padding: 20px; background-color: #f8f9fa; color: #333; line-height: 1.6; } header { text-align: center; padding: 30px 0; background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); color: white; border-radius: 10px; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); } h1, h2, h3 { color: #2c3e50; } h1 { font-size: 2.8rem; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); } h2 { color: #2575fc; border-bottom: 2px solid #2575fc; padding-bottom: 8px; margin-top: 30px; } section { background: white; padding: 25px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); margin-bottom: 25px; } .highlight { background-color: #eef7ff; padding: 15px; border-left: 4px solid #2575fc; border-radius: 0 8px 8px 0; margin: 20px 0; } table { width: 100%; border-collapse: collapse; margin: 20px 0; } table, th, td { border: 1px solid #ddd; } th, td { padding: 12px; text-align: left; } th { background-color: #eef7ff; } form { background: #f9fafa; padding: 20px; border-radius: 8px; } fieldset { border: 1px solid #ddd; padding: 15px; margin-bottom: 15px; border-radius: 5px; } legend { font-weight: bold; color: #2575fc; } label { display: block; margin: 10px 0 5px; } input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="date"], select, textarea { width: 100%; padding: 8px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; } input[type="checkbox"], input[type="radio"] { margin-right: 5px; } button { background-color: #2575fc; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; } button:hover { background-color: #1a5fc2; } footer { text-align: center; padding: 20px; color: #666; font-size: 0.9rem; } img[usemap] { border: 2px solid #2575fc; } .link-item { margin: 10px 0; padding: 12px 15px; background-color: #f0f4ff; border-left: 4px solid #2575fc; border-radius: 6px; transition: all 0.3s ease; } .link-item:hover { background-color: #e0e8ff; transform: translateX(5px); } .link-item a { text-decoration: none; color: #2575fc; font-weight: 500; display: flex; align-items: center; gap: 12px; } .link-item i { font-size: 1.2em; width: 24px; text-align: center; } </style> </head> <body> <header> <h1><i class="fas fa-music"></i> 沉浸式音乐体验</h1> <p>探索声音的艺术世界</p > </header> <section id="links"> <h2><i class="fas fa-link"></i> 超链接</h2> <div class="link-item"> <a href="https://www.bilibili.com/" target="_blank"> <i class="fas fa-globe-americas"></i> 网站链接:访问哔哩哔哩 </a > </div> <div class="link-item"> <a href="https://music.163.com/" target="_blank"> <i class="fas fa-globe-americas"></i> 网站链接:访问网易云音乐 </a > </div> <div class="link-item"> <a href="images/音乐会.jpg" target="_blank"> <i class="fas fa-image"></i> 图像链接:查看音乐会大图 </a > </div> <div class="link-item"> <a href="music/我用什么把你留住.mp3" download> <i class="fas fa-download"></i> 下载链接:下载《我用什么把你留住》 </a > </div> <div class="link-item"> <a href="#contact"> <i class="fas fa-anchor"></i> 锚点链接:跳转到音乐爱好者反馈表单 </a > </div> <h3><i class="fas fa-map-marked-alt"></i> 图像热点链接</h3> < img src="images/恋人.png" alt="歌曲恋人" usemap="#concert-map" width="460px"height="460px"> <map name="concert-map"> <area shape="rect" coords="0,0,470,470" href="https://www.bilibili.com/video/BV1pE421N7Vi/?spm_id_from=333.337.search-card.all.click" alt="恋人" title="恋人歌曲MV"> </map> < img src="images/Star Crossing Night.png" alt="歌曲Star Crossing Night" usemap="#Star Crossing Night-map" width="460px"height="460px"> <map name="Star Crossing Night-map"> <area shape="rect" coords="0,0,470,470" href="https://www.bilibili.com/video/BV1EYhQz6EM5/" alt="Star Crossing Night" title="Star Crossing Night歌曲MV"> </map> </section> <section id="featured-music"> <h2>本日推荐</h2> <div class="music-info"> <div class="music-player"> <h3>《我用什么把你留住》</h3> <p>是福禄寿FloruitShow创作的一首关于生命、失去与珍惜的哲思之作。</p > <p>“在这浩瀚星河你是什么</p > <p>在她温柔眼眸的你是什么</p > <p>闪着光坠落 又依依不舍</p > <p>所以生命啊 它璀璨如歌</p > <p>你一定要看到花开</p > <p>你一定等燕子归来</p > <p>想着它们都会回来</p > <p>你誓死为了这些而存在”</p > <div class="media-container"> <audio src="music/我用什么把你留住.mp3" controls> <source src="music/我用什么把你留住.mp3" type="audio/mpeg"> 您的浏览器不支持音频元素 </audio> </div> </div> <div class="music-player"> <h3>《雪人》</h3> <p>由新锐音乐人驼儿创作,融合电子与说唱元素,带你进入梦幻般的音乐旅程。</p > <p>“来年再见吧雪人 现在这骄阳太旺了</p > <p>等来年都装上嘴唇、鱼尾纹和下巴</p > <p>一期一会喽雪人 我会陪你一起融化的</p > <p>我们把这寒冷忘了</p > <p>让我们把这寒冷都忘了”</p > <div class="media-container"> <video src="shipin/雪人视频.mp4"controls> <source src="【2116 《雪人》-驼儿】https://www.bilibili.com/video/BV1W4XPYxExC?vd_source=dadd11e03a268117e18a56aaf18bcf9e" type="video/mp4"> 您的浏览器不支持视频元素 </video> </div> </div> </div> </section> <section id="music-lists"> <h2>音乐分类</h2> <div class="music-info"> <div class="music-categories"> <h3>热门音乐类型</h3> <ul> <li>流行音乐</li> <li>摇滚乐</li> <li>电子舞曲</li> <li>古典音乐</li> <li>爵士乐</li> </ul> </div> <section id="table"> <h2>音乐排行榜与信息表</h2> <table> <thead> <tr> <th rowspan="2">排名</th> <th rowspan="2">歌曲名称</th> <th colspan="2">相关信息</th> </tr> <tr> <th>歌手</th> <th>发行年份</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>《恋人》</td> <td>李荣浩</td> <td>2024-10-18</td> </tr> <tr> <td>2</td> <td>《打火机》</td> <td>Penny</td> <td>2025-06-05</td> </tr> <tr> <td>3</td> <td>《Star Crossing Night》</td> <td colspan="2" style="text-align: center;">徐明浩/GALI</td> </tr> <tr> <td>4</td> <td>《如果呢》</td> <td>郑润泽</td> <td rowspan="2" style="text-align: center;">2021</td> </tr> <tr> <td>5</td> <td>《还是会想你》</td> <td>林达浪/h3R3</td> </tr> </tbody> </table> </section> </div> <h3>音乐术语词典</h3> <dl> <dt>和弦 (Chord)</dt> <dd>三个或更多不同音高的音符同时发声</dd> <dt>节奏 (Rhythm)</dt> <dd>音乐中时间组织的模式,包括节拍和节奏型</dd> <dt>音色 (Timbre)</dt> <dd>声音的品质特征,使不同乐器演奏相同音符时产生区别</dd> </dl> </div> </section> <!-- 表单部分 --> <section id="contact"> <section id="contact"> <h2><i class="fas fa-edit"></i> 音乐爱好者反馈表单</h2> <form action="#" method="post"> <fieldset> <legend>👤 个人信息</legend> <label for="name"><i class="fas fa-user"></i> 姓名:</label> <input type="text" id="name" name="name" required placeholder="请输入您的姓名"> <label for="email"><i class="fas fa-envelope-open"></i> 邮箱:</label> <input type="email" id="email" name="email" required placeholder="example@domain.com"> <label for="website"><i class="fas fa-globe"></i> 个人主页:</label> <input type="url" id="website" name="website" placeholder="https://your-site.com"> <label for="phone"><i class="fas fa-phone"></i> 电话号码:</label> <input type="tel" id="phone" name="phone" placeholder="138-0000-0000"> </fieldset> <fieldset> <legend>🎧 偏好设置</legend> <label><i class="fas fa-check-square"></i> 喜欢的音乐类型:</label> <label><input type="checkbox" name="genre" value="pop"> <i class="fas fa-music"></i> 流行</label> <label><input type="checkbox" name="genre" value="rock"> <i class="fas fa-drum"></i> 摇滚</label> <label><input type="checkbox" name="genre" value="electronic"> <i class="fas fa-synagogue"></i> 电子</label> <label for="experience"><i class="fas fa-star-half-alt"></i> 音乐经验:</label> <select id="experience" name="experience"> <option value="">请选择</option> <option value="beginner">初学者</option> <option value="intermediate">中级</option> <option value="expert">专家</option> </select> <label><i class="fas fa-question-circle"></i> 是否愿意参加线下活动?</label> <label><input type="radio" name="event" value="yes"> ✅ 是</label> <label><input type="radio" name="event" value="no"> ❌ 否</label> </fieldset> <fieldset> <legend>其他信息</legend> <label for="birthday">出生年份:</label> <input type="date" id="birthday" name="birthday"> <label for="message">留言:</label> <textarea id="message" name="message" rows="4" placeholder="写下您的想法..."></textarea> <button type="submit">提交反馈</button> </fieldset> </form> <section id="resources"> <h2>音乐学习资源</h2> <ul> <li>在线音乐课程平台</li> <li>乐器选购指南</li> <li>音乐制作软件推荐</li> <li>本地音乐工作坊信息</li> </ul> </section> <footer> <p>© 2025 沉浸式音乐体验 | 使用HTML5技术构建</p > <p>视频来源:哔哩哔哩 | 音频来源:网易云音乐</p > </footer> </body> </html 根据以上代码,加入1.样式引入:在网页中引入 CSS3 样式的方式,包括行内样式、内嵌样式表和链接样式表。 2.使用选择器: 基本选择器:标签选择器、类选择器、ID选择器 复合选择器:交集选择器、并集选择器、后代选择器、子代选择器 伪类选择器:锚点伪类,有":link"和":visited";行为伪类,有":hover"、":active"和":focus"; 3.尝试一下ess样式的继承性和层叠性。继承性是指在 HTML5 结构中,后代元素会继承祖先元素的 CSS3 样式。层叠性是指当为一个元素设置了多个样式时,这些样式会根据各自的权重来确定呈现的优先级,然后其中一个值会层叠/覆盖掉其他值,并显示最终效果。
10-22
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8"> <!-- 页面标题,可根据您的主题修改 --> <title>我的项目 - 角色介绍</title> <!-- 设置favicon图标 --> <link rel="icon" href="img/favicon.png" sizes="16x16"> <!-- 内部CSS样式 --> <style> /* 全局样式 */ html, body { margin: 0; font-family: Arial, sans-serif; background-color: black; /* 背景图片,可替换为您的图片 */ background-image: url(img/background.png); background-size: cover; background-position: center; background-repeat: no-repeat; text-align: center; overflow-x: hidden; } /* 头部样式 */ header { padding: 10px; color: #ecf0f1; /* 头部背景图片 */ background-image: url(img/header-bg.png); background-repeat: repeat-x; background-position: left bottom; display: flex; justify-content: space-between; align-items: center; } header h1 { margin-left: 20px; font-size: 24px; } .button-area { margin-right: 20px; } /* 导航按钮样式 */ .button { display: inline-block; text-align: center; padding: 8px; width: 100px; text-decoration: none; color: black; /* 按钮背景图片 */ background: url(img/button-bg.png) no-repeat center; background-size: contain; transition: all 0.2s ease-in-out; } .button:hover { transform: scale(1.1); opacity: 0.5; } /* 回到顶部按钮 */ #to-top { position: fixed; bottom: 20px; right: 20px; width: 64px; height: 64px; background: url(img/to-top.png) no-repeat center; background-size: contain; z-index: 1000; transition: all 0.1s ease-in-out; } #to-top:hover { opacity: 0.8; } /* 宣传区域 */ #hero { position: relative; height: 500px; margin: auto; /* 海报背景图片 */ background: url(img/hero-bg.png) no-repeat center top; background-size: cover; } #hero-logo { max-width: 200px; position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); } #buy-now { position: absolute; bottom: 100px; right: 50px; width: 200px; height: 100px; background: url(img/buy-now.png) no-repeat center; background-size: contain; z-index: 10; transition: opacity 0.1s ease-in-out; } #buy-now:hover { opacity: 0.8; } /* 内容介绍区域 */ .intro { width: 800px; margin: 50px auto; padding: 20px; /* 介绍区域背景图片 */ background: url(img/intro-bg.png) no-repeat center; background-size: contain; color: white; } .intro h2 { font-size: 28px; } /* 角色展示区域 */ .characters { width: 800px; margin: 50px auto; } .character { display: none; /* 默认隐藏所有角色 */ background: url(img/character-bg.png) no-repeat center; background-size: contain; width: 800px; height: 400px; padding: 20px; color: white; text-align: left; } .character.active { display: block; /* 显示当前选中的角色 */ } .character img { max-width: 150px; margin-right: 20px; vertical-align: top; } .character h3 { display: inline-block; font-size: 24px; margin: 0; } .character p { font-size: 16px; margin-top: 10px; } /* 角色切换按钮 */ .character-switch { display: flex; justify-content: center; gap: 10px; margin: 20px 0; } .switch-btn { width: 50px; height: 50px; background-size: contain; cursor: pointer; transition: opacity 0.2s ease-in-out; } .switch-btn:hover { opacity: 0.7; } /* 页脚 */ footer { color: white; text-align: center; padding: 20px; background: url(img/footer-bg.png) no-repeat center; background-size: cover; } footer img { max-width: 100px; margin: 10px; } </style> </head> <body> <!-- 回到顶部按钮 --> <a id="to-top" href="#"></a> <!-- 头部导航 --> <header> <h1>我的项目</h1> <div class="button-area"> <a href="#" class="button">首页</a> <a href="#" class="button">购买</a> <a href="#" class="button">关于</a> </div> </header> <!-- 宣传区域 --> <div id="hero"> <img id="hero-logo" src="img/logo.png" alt="项目标志"> <a id="buy-now" href="#"></a> </div> <!-- 内容介绍 --> <div class="intro"> <h2>项目介绍</h2> <p>这是一个示例项目,介绍您的核心内容或故事背景。您可以在这里添加关于项目、游戏或主题的描述,吸引用户继续探索。</p> </div> <!-- 角色展示 --> <div class="characters"> <h2>角色介绍</h2> <!-- 角色1 --> <div class="character active" id="char1"> <img src="img/character1.png" alt="角色1"> <div> <h3>角色1</h3> <p>角色1的描述,介绍其背景、特点或故事。替换为您的内容。</p> </div> </div> <!-- 角色2 --> <div class="character" id="char2"> <img src="img/character2.png" alt="角色2"> <div> <h3>角色2</h3> <p>角色2的描述,介绍其背景、特点或故事。替换为您的内容。</p> </div> </div> <!-- 角色3 --> <div class="character" id="char3"> <img src="img/character3.png" alt="角色3"> <div> <h3>角色3</h3> <p>角色3的描述,介绍其背景、特点或故事。替换为您的内容。</p> </div> </div> <!-- 角色切换按钮 --> <div class="character-switch"> <img src="img/switch1.png" class="switch-btn" onclick="showCharacter('char1')" alt="角色1按钮"> <img src="img/switch2.png" class="switch-btn" onclick="showCharacter('char2')" alt="角色2按钮"> <img src="img/switch3.png" class="switch-btn" onclick="showCharacter('char3')" alt="角色3按钮"> </div> </div> <!-- 页脚 --> <footer> <div> <img src="img/logo1.png" alt="公司标志1"> <img src="img/logo2.png" alt="公司标志2"> </div> <p>© 2025 我的项目。版权所有。</p> </footer> <!-- JavaScript for character switching --> <script> function showCharacter(charId) { // 隐藏所有角色 document.querySelectorAll('.character').forEach(char => { char.classList.remove('active'); }); // 显示选中的角色 document.getElementById(charId).classList.add('active'); } </script> </body> </html> 帮我为这段代码的每一行增加更加详细的注释(方便初学者理解代码)
05-29
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值