- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
这是我页面的 JSFiddle(包括源代码):
https://jsfiddle.net/g0kw1Le8/
源代码:
<TITLE>Hallam FM - Best Variety of Hits</TITLE>
<style>
div {
display: table;
border: 4px;
border-color: black;
}
div.guideline {
display: table;
}
div.info {
display: table-row;
}
div.info1 {
display: table-cell;
background-color: ivory;
}
div img {
height: 40px;
display: none;
}
div p {
display: none;
}
.epg-root { position: relative; }
.epg { box-sizing: border-box; margin-bottom: 20px; }
.epg .highlight { background-color: rgb(229, 229, 229); }
.epg .highlight td { border: 1px solid rgb(0, 0, 0); }
.epg .highlight td:first-child { border-left: medium none; }
.epg .highlight td:last-child { border-right: medium none; }
.days { font-family: "Gotham A","Gotham B","helvetica neue",arial,sans-serif; font-size: 1.313em; border-top: 2px solid rgb(0, 0, 0); list-style-type: none; margin-bottom: 0px; }
.days li { text-align: center; height: 100px; line-height: 100px; }
.days li:first-child { border-top: medium none; }
.days .live { position: relative; z-index: 10; background-color: rgb(188, 188, 188); color: rgb(255, 255, 255); border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; margin-bottom: -1px; margin-left: -1px; }
.epg-left { padding-top: 100px; }
.epg-controls { position: relative; z-index: 10; }
.epg-controls button { height: 100px; width: 10%; font-size: 55px; background-color: rgb(255, 255, 255); cursor: pointer; color: rgb(134, 134, 134); line-height: 1.1; }
.epg-controls button:hover { color: rgb(94, 94, 94); }
.epg-controls .next, .epg-controls .prev { position: absolute; top: 0px; }
.epg-controls .next { right: 0px; box-shadow: -15px 0px 21px -3px rgb(255, 255, 255); }
.epg-controls .prev { left: 0px; }
.epg-table { width: 2200px; table-layout: fixed; border-collapse: collapse; margin: 0px; overflow: hidden; }
.epg-table th, .epg-table td { height: 100px; border-bottom: medium none; }
.epg-table th:first-child, .epg-table td:first-child { border-left: medium none; }
.epg-table th:last-child, .epg-table td:last-child { border-right: medium none; }
.epg-table tr:first-child th { border-top: medium none; }
.epg-table td { cursor: pointer; }
.epg-table .expanded { position: relative; }
.epg-table .expanded .epg-item { position: absolute; z-index: 20; width: 460px; height: auto; padding: 10px; background-color: rgb(255, 255, 255); box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.4); margin-left: -110px; margin-top: -75px; }
.epg-table .expanded .epg-item:hover { background: none repeat scroll 0% 0% rgb(255, 255, 255); color: rgb(52, 52, 52); }
.epg-table .expanded .epg-item .media__img { display: block; }
.epg-table .expanded .epg-item-details { display: block; }
.epg-table .sun .expanded .epg-item { top: auto; bottom: 10px; }
.times { text-align: center; font-size: 1.313em; }
.times th { font-weight: normal; border-bottom: 2px solid rgb(0, 0, 0); width: 4.16667%; }
.times th.active { background-color: rgb(188, 188, 188); color: rgb(255, 255, 255); }
.tues, .thurs, .sat { background-color: rgb(249, 249, 249); }
.schedule-scroll { overflow-x: scroll; border-left: 2px solid rgb(0, 0, 0); position: relative; }
.epg-item { position: relative; height: 100px; }
.epg-item:hover { background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0px, rgb(225, 225, 225) 100%) repeat scroll 0% 0% transparent; box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.4); }
.live .epg-item { background-color: rgb(188, 188, 188); color: rgb(255, 255, 255); }
.live.expanded .epg-item { background-color: rgb(188, 188, 188); }
.live.expanded .epg-item:hover { background-color: rgb(188, 188, 188); color: rgb(255, 255, 255); }
.live.expanded .epg-item .media__img { border-color: rgb(255, 255, 255); background-color: rgb(255, 255, 255); }
.epg-item .epg-status { text-transform: uppercase; font-size: 0.8em; margin: 0px; position: absolute; right: 8px; bottom: 8px; }
.epg-item .epg-status::before { position: absolute; content: ""; left: -17px; top: 2px; width: 0px; height: 0px; border-style: solid; border-width: 6.5px 0px 6.5px 11px; border-color: transparent transparent transparent rgb(255, 255, 255); }
.epg-item .media__img { display: none; height: 120px; width: 120px; margin-right: 10px; }
.epg-item .media__img:hover { display: block; height: 120px; width: 120px; margin-right: 10px; }
.highlight .epg-item:hover { color: rgb(255, 255, 255); background: -moz-linear-gradient(center top , rgb(140, 140, 140) 0px, rgb(188, 188, 188) 100%) repeat scroll 0% 0% transparent; }
.epg-item-details { display: none; }
.epg-item-details:hover { display: block; }
.epg-item-details p { margin-bottom: 0.8em; font-size: 0.875em; }
.epg-item-details .btn { font-size: 1.313em; }
.epg-container li.hovered .epg-item-title, .epg-container li.hovered .epg-item-time { color: rgb(255, 255, 255); }
.epg-item-title { margin: 0px; padding: 0.4em; overflow: hidden; text-overflow: ellipsis; font-size: 1.025em; max-height: 3.25em; }
.expanded .epg-item-title { padding: 0px 0px 0.4em; font-size: 1.625em; }
.epg-now { width: 1px; top: 102px; bottom: 0px; position: absolute; background-color: rgb(255, 0, 0); }
.epg-now::before { content: ""; position: absolute; display: block; left: -11px; top: 0px; width: 0px; height: 0px; border-style: solid; border-width: 11px 11px 0px; border-color: rgb(255, 0, 0) transparent transparent; }
.widget-epg-mobile { position: relative; margin: 0px -20px; }
</style>
<div class="epg-table">
<div height="300" class="info1">00:00</div>
<div height="300" class="info1">01:00</div>
<div height="300" class="info1">02:00</div>
<div height="300" class="info1">03:00</div>
<div height="300" class="info1">04:00</div>
<div height="300" class="info1">05:00</div>
<div height="300" class="info1">06:00</div>
<div height="300" class="info1">07:00</div>
<div height="300" class="info1">08:00</div>
<div height="300" class="info1">09:00</div>
<div height="300" class="info1">10:00</div>
<div height="300" class="info1">11:00</div>
<div height="300" class="info1">12:00</div>
<div height="300" class="info1">13:00</div>
<div height="300" class="info1">14:00</div>
<div height="300" class="info1">15:00</div>
<div height="300" class="info1">16:00</div>
<div height="300" class="info1">17:00</div>
<div height="300" class="info1">18:00</div>
<div height="300" class="info1">19:00</div>
<div height="300" class="info1">20:00</div>
<div height="300" class="info1">21:00</div>
<div height="300" class="info1">22:00</div>
<div height="300" class="info1">23:00</div>
</div>
<div style="width:60px;" class="info1"></div>
<div class="info1">John Doe
<p><img src="logo.jpg">John Doe on the late show!</p></div>
<div style="width:300px;"class="info1"></div>
<div class="info1">Richard Roe
<p><img src="logo.jpg">More OF THE BEST VARIETY of hits!</p></div>
<div style="width:240px;" class="info1"></div>
<div class="info1">Hallam FM Breakfast
<p><img src="logo.jpg">hALLAM fm IN THE MORNING!</p></div>
<div style="width:300px;"class="info1"></div>
<div class="info1">Weekday Daytimes
<p><img src="logo.jpg">John Doe!!</p></div>
<div style="width:240px;"class="info1"></div>
<div class="info1">Jon Smith
<p><img src="logo.jpg">John Doe!!</p></div>
<div style="width:180px;"class="info1"></div>
<div class="info1">Evening Show
<p><img src="logo.jpg">John Doe!!</p></div>
<div style="width:120px;"class="info1"></div>
<div class="info1">Late Night hallam fm
我想做的是两件事:
在显示演示者照片和信息的地方有一个悬停效果,就像在这个页面上一样 https://web.archive.org/web/20150104182605/http://www.hallamfm.co.uk:80/on-air/station-schedule/ (但我的设计是垂直的,不像 web.archive 链接是水平的)或者这个:https://www.mix96.co.uk/schedule/ (注意悬停效果)
使显示的宽度适合,例如4 小时的节目宽度为 240(240 分钟 = 4 小时)。当 JSFiddle 运行时,它显示它们全部打包,并且不适合 div 顶部的时间。
我一直在尝试,但无法成功复制上面 Internet Archive 链接中看到的设计。
如有任何建议,我将不胜感激。
最佳答案
您的布局可能可以通过 <table>
实现但您可能会发现 CSS 网格使用起来更灵活(也更有趣)。
您可以创建 24 个网格列并使用不同的类分配时隙。
确保附加信息有position: absolute
关于它的元素。悬停时,更改 display
类型。
body {
margin: 0;
padding: 1rem;
background: black;
color: lightgrey;
font-family: sans-serif;
font-weight: 300;
line-height: 1.35;
}
img {
display: none;
}
.wrapper {
display: grid;
grid-template-columns: repeat(24, 60px);
grid-gap: .5rem;
}
.mins-60 {
grid-column: span 1;
}
.mins-120 {
grid-column: span 2;
}
.mins-180 {
grid-column: span 3;
}
.mins-240 {
grid-column: span 4;
}
.mins-300 {
grid-column: span 5;
}
div[class^="mins"] {
position: relative;
border-top: .333rem solid white;
padding-top: .333rem;
cursor: default;
}
p {
display: none;
position: absolute;
top: 1rem;
border: .1rem solid white;
border-top-width: .3333rem;
background: black;
padding: 1rem;
width: 15rem;
}
div[class^="mins"]:hover p {
display: block;
}
<div class="wrapper">
<div>00:00</div>
<div>01:00</div>
<div>02:00</div>
<div>03:00</div>
<div>04:00</div>
<div>05:00</div>
<div>06:00</div>
<div>07:00</div>
<div>08:00</div>
<div>09:00</div>
<div>10:00</div>
<div>11:00</div>
<div>12:00</div>
<div>13:00</div>
<div>14:00</div>
<div>15:00</div>
<div>16:00</div>
<div>17:00</div>
<div>18:00</div>
<div>19:00</div>
<div>20:00</div>
<div>21:00</div>
<div>22:00</div>
<div>23:00</div>
<div class="mins-60">John Doe
<p><img src="logo.jpg">John Doe on the late show !</p>
</div>
<div class="mins-300">Richard Roe
<p><img src="logo.jpg">More OF THE BEST VARIETY of hits !</p>
</div>
<div class="mins-240">Hallam Fm Breakfast
<p><img src="logo.jpg">hALLAM fm IN THE MORNING !</p>
</div>
<div class="mins-300">Weekday Daytimes
<p><img src="logo.jpg">John Doe ! !</p>
</div>
<div class="mins-240">Jon Smith
<p><img src="logo.jpg">John Doe ! !</p>
</div>
<div class="mins-180">Evening Show
<p><img src="logo.jpg">John Doe ! !</p>
</div>
<div class="mins-120">Late Night
<p><img src="logo.jpg">John Doe ! !</p>
</div>
</div>
关于html - 使 DIV 看起来像广播电台/电视节目表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50075610/
#include #include #include using namespace std::chrono; int main(int arc, char* argv[]) { con
我是 opencv 的新手。当我将 sRGB png 提供给它时,我发现以下代码交换了红色和蓝色 channel 。我应该责怪哪个函数,imread 还是 fromarray? 最佳答案 是的,O
我正在使用以下代码,它缩小了每一行,并且由于某种原因整个用户界面也丢失了。我该如何解决?
它是关于以下设置的:Linux 机器、bash、adb、带有 Busybox 的嵌入式 Linux 目标系统。对于目标系统,以下适用: adb shell echo $SHELL /bin/sh ad
当我在 Android Studio 上创建一个空 fragment 时,它会生成以下代码: /** * A simple {@link Fragment} subclass. * Activit
我正在尝试从 Meteor 应用程序的服务器端发布用户的 Facebook 提要: result = Meteor.http.call 'POST', "https://graph.faceb
目前我有两个不同的查询,它们返回完全相同的结果,但是,更改从中过滤结果的参数会使它们以非常不同的方式运行。 搜索 cartography 时的结果 查询 #1: 22 行/~860 毫秒; SELEC
我已经创建了结构: typedef struct { short s; int i; struct Ss { short s; }; } S;
我想在 Java 中打印反斜杠 t。但每当我尝试时,它实际上都将它作为\t 运算符。双反斜杠不起作用。我该怎么做。 最佳答案 例如通过添加另一个反斜杠来转义反斜杠 System.out.println
我想弄清楚为什么 UIActivityViewController 发送一个稍微转换过的字符串来分享给邮件和微信。 这是我的代码: let activityViewController = UIAct
创建标准 SQLite 游标后,我将使用以下方法遍历条目: while (cursor.moveToNext()) { } 所有行都被正确处理。我读过的所有文档都表明您需要发出 moveToFirst
我正在尝试创建一个基本论坛,但在 SQL 中仅打印一行时遇到问题。这是我的 PHP: {$title}"; } } else { print "failed to reach post
我的新 div 元素 ( ) 似乎隐藏在图像后面。我键入的任何内容都显示在图像后面。我想在背景图片之后继续工作。 这是我的代码: DISPLAY
UPD。一行代码解决了问题:.lean() axplanation here 我在 Model.find(...blablabla : [ {"_id":"578763de6e8e0542195ef4
我在 Ubuntu 16.04 中安装了 Tomcat 8.0.45。我使用 let's encrypt 生成的证书启用了 HTTPS 连接器。它就像一个魅力。但是今天Tomcat无法启动HTTPS连
今天,我在一台全新安装了 Windows 7 Ultimate 64 位的新笔记本电脑上安装了 Visual Studio 2010 Professional。我非常习惯于 Visual Studio
根据 Oracle,我应该能够将 .intValue() 和 .compareTo() 之类的方法应用于 double ,但是当我编写 dbl.toString( ) 例如,在 NetBeans 中,
正在为应用程序开发一些拖放功能,虽然可以使用“重影图像”来完成很多事情,将毒品从一个地方转移到另一个地方,但它们看起来总是有点“褪色” - 因此得名鬼影。是否有可能使这些具有与原始颜色相同的深度?谢谢
我是这方面的新手,很抱歉犯了一些愚蠢的错误。快乐学习。每当我使用 URL : localhost:3000/posts/whatever 时,我都会收到无法获取错误。在你问之前,是的,那是在我将内容放
背景 这自然是合法的: let closure: (Int, Int) -> () = { print($0 + $1) } closure(1, 2) // 3 鉴于,自进化提案实现以来 SE-01
我是一名优秀的程序员,十分优秀!