如图所示的时间表,一般是怎么实现的?_html/css_WEB-ITnose
假设有 “教室表” 和 “教室使用情况表”,如何做出类似下图所示的表格?或者有什么现成的工具可以快速生成?
回复讨论(解决方案)
<!DOCTYPE html><html><head><title></title><meta charset="utf-8"><meta http-equiv="Pragma" content="no-cache"> <script type="text/javascript" src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script><script type="text/javascript">$(function(){ $(".bg0").click(function(){ var y_idx = $(this).parents(".t-body").index()-1; var x_idx = $(this).index(); alert("x="+x_idx+", y="+y_idx);//x和y是第几行、第几列 });});</script><style type="text/css">html,body,dl,dd,dt{padding:0;margin:0;}.container{font-size:14px;line-height:30px;}dl{clear:both;position:relative;}dt{float:left;box-sizing:border-box;height:40px;width:120px;}dd{float:left;box-sizing:border-box;height:40px;width:40px;}.container{}.t-head1 dt {height:22px;}.t-head1 dd {height:22px;font-size:12px;margin-left:-1px;}.t-head2 dt {height:22px;border-right:1px solid #333;}.t-head2 dd {height:22px;border-right:1px solid #333;border-bottom:1px solid #333;}.t-body dt {text-align:center;border-right:1px solid #333;}.t-body dd{border-bottom:1px solid #333;background:#c6e1ff;}.bg1{background:#ff6462!important;}.bg2{background:#ffff9d!important;}.bg0{background:#c6e1ff;cursor:pointer;}.bg0:hover{background:#3300ff;}</style></head><body><div class="container"><dl class="t-head1"><dt></dt><dd>8点</dd><dd>9点</dd><dd>10点</dd><dd>11点</dd><dd>12点</dd><dd>13点</dd><dd>14点</dd><dd>15点</dd><dd>16点</dd><dd>17点</dd><dd>18点</dd><dd>19点</dd><dd>20点</dd><dd>21点</dd></dl><dl class="t-head2"><dt></dt><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd><dd></dd></dl><dl class="t-body"><dt>接待室</dt><dd class="bg0"></dd><dd class="bg1"></dd><dd class="bg1"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd></dl><dl class="t-body"><dt>报告厅</dt><dd class="bg1"></dd><dd class="bg2"></dd><dd class="bg2"></dd><dd class="bg2"></dd><dd class="bg1"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd></dl><dl class="t-body"><dt>会议厅</dt><dd class="bg0"></dd><dd class="bg2"></dd><dd class="bg1"></dd><dd class="bg1"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd></dl><dl class="t-body"><dt>活动中心</dt><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg1"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg1"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd><dd class="bg0"></dd></dl></div></body></html>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.
