- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我绝对是 CSS 的新手,它让我头疼不已。我为日历 block 设置了以下内容,这在 Chrome 中看起来很棒:
/* calendar */
table.calendar { border-left:1px solid #999; }
tr.calendar-row { }
td.calendar-day { min-height:200px; font-size:8px; position:relative; } * html div.calendar- day { height:200px; }
td.calendar-day-np { background:#E8EDFF; min-height:200px; } * html div.calendar-day-np { height:200px; }
td.calendar-day-head { background:#E8EDFF; font-weight:bold; text-align:center;
width:120px; padding:5px; border-bottom:1px solid #999; border-top:1px solid #999; border-right:1px solid #999; }
div.day-number {
background:#0099FF;
position:absolute;
z-index:2;
top:-0px;
right:-25px;
padding:5px;
color:#fff;
font-weight:bold;
width:20px;
text-align:center;
border-bottom:1px solid #999;
border-left:1px solid #999;
}
td.calendar-day, td.calendar-day-np {
width:150px;
max-width:150px;
max-height:75px;
white-space:nowrap;
overflow-x: hidden;
overflow-y: auto;
top:0px;
padding:0px 25px 5px 5px;
border-bottom:1px solid #999;
border-right:1px solid #999;
}
.ui-dialog-titlebar {display:none;}
td.calendar-day div.event, td.calendar-day-np div {
overflow-x:hidden;
overflow-y:auto;
width:200px;
max-width:200px;
max-height:75px;
white-space:nowrap;
}
HTML 是这样的(由 php 生成):
<tr class="calendar-row"><td class="calendar-day"><div style="position:relative;height:100px;"><div class="day-number">7</div><p> </p><p> </p></div></td>
<td class="calendar-day"><div style="position:relative;height:100px;"><div class="day-number">8</div><div class="event">14:00-PCR Taylorsville / Rehab</div><div class="event">17:00-PCR Taylorsville / Rehab</div></div></td>
<td class="calendar-day"><div style="position:relative;height:100px;"><div class="day-number">9</div><div class="event">13:00-PCR Taylorsville / Rehab</div><div class="event">14:00-PCR Taylorsville / Audiology</div><div class="event">15:00-PCR Taylorsville / Rehab</div><div class="event">15:30-PCR Taylorsville / Rehab</div><div class="event">16:15-Taylorsville Dermatology</div></div></td>
<td class="calendar-day"><div style="position:relative;height:100px;"><div class="day-number">10</div><div class="event">08:30-Redwood Clinic GI</div><div class="event">10:00-U of U Hospital HTSHTS</div><div class="event">13:00-PCR Taylorsville / Rehab</div><div class="event">15:20-PCR Taylorsville / Audiology</div><div class="event">16:00-PCR Taylorsville / Rehab</div><div class="event">18:20-Taylorsville Clinic, Instacare </div><div class="event">20:20-Taylorsville Clinic, Instacare </div></div></td>
<td class="calendar-day"><div style="position:relative;height:100px;"><div class="day-number">11</div><div class="event">13:30-Taylorsville Clinic, Instacare </div><div class="event">17:30-Taylorsville PT Adult</div></div></td>
<td class="calendar-day"><div style="position:relative;height:100px;"><div class="day-number">12</div><div class="event">09:45-Intermountain Heart Institute IMC</div><div class="event">13:00-PCR Taylorsville / Rehab</div><div class="event">15:00-PCR Taylorsville / Audiology</div><div class="event">16:30-PCR Taylorsville / Rehab</div><div class="event">17:30-Taylorsville Clinic Instacare</div><div class="event">18:50-Taylorsville Clinic Instacare</div></div> </td>
<td class="calendar-day"><div style="position:relative;height:100px;"><div class="day-number">13</div><p> </p><p> </p></div></td>
然而,在 Firefox 中,这两个属性似乎被忽略了。
overflow-x: hidden;
overflow-y: auto;
在 IE 中,我的信息从页面的一半开始。我该怎么做才能在所有 3 种浏览器中获得相同的结果?
最佳答案
Firefox 可能就在这里,Chrome 错了(和往常一样,IE 可能坏了)。
TD
元素不是 block 级元素!正如您在 Standard CSS for HTML 4 中看到的那样, TD
元素的类型为 display: table-cell
. CSS 属性 overflow
仅适用于创建框的元素,这些是 block
类型的元素, inline-block
和 list-item
.盒子的概念与其他元素不同。
您可以通过放置 DIV
来让 Firefox 隐藏 x-overflow(并在需要时为 y-overflow 添加滚动条)元素到您的表格单元格中,因为这些将创建一个框。这在 Chrome 中应该仍然有效(但我不知道它在 IE 中的作用)。
这是一个例子:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Test</title>
<style type="text/css">
td.calendar-day, td.calendar-day-np {
width:150px;
max-width:150px;
max-height:75px;
top:0px;
padding:0px 25px 5px 5px;
border-bottom:1px solid #999;
border-right:1px solid #999;
}
td.calendar-day div, td.calendar-day-np div {
overflow-x:hidden;
overflow-y:auto;
width:150px;
max-width:150px;
max-height:75px;
white-space:nowrap;
}
</style>
</head>
<body>
<table>
<tr>
<td class="calendar-day"><div>Test1</div></td>
<td class="calendar-day"><div>Test2 Test2 Test2 Test2 Test2<br>Test2<br>Test2<br>Test2<br>Test2</div></td>
<td class="calendar-day"><div>Test3</div></td>
</tr>
<tr>
<td class="calendar-day"><div>Test4 Test4 Test4 Test4 Test4</div></td>
<td class="calendar-day"><div>Test5</div></td>
<td class="calendar-day"><div>Test6</div></td>
</tr>
</table>
</body>
</html>
关于css - 为什么我的日历的 CSS 在 IE 和 Firefox 中显示错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17886790/
我是网页设计新手。现在我遇到了我目前工作的 2 个网站的问题。我的模板只支持 Firefox 浏览器,不支持其他主流浏览器,如 IE、chrome、Opera、safari。 我试过一些 If IE
在我的 HTML 上,使用了下面的元标记来解决一些字体问题。我只想知道: 这两个元标记的含义相同吗?还是每一个都不一样? [以逗号分隔] [以分号分隔] 请解释一下。 最佳答案 Microsoft
这句话究竟是什么意思? 部分示例使用 ,分隔 IE 的版本,而有些使用 ; ;哪个是正确的? 订单IE=9; IE=8; IE=7; IE=EDGE有一些重要性,我想知道。 编辑:我正在使用 最佳答
这句话究竟是什么意思? 一些示例使用 ,分隔 IE 的版本,而有些使用 ; ;哪个是正确的? 订单IE=9; IE=8; IE=7; IE=EDGE有一定的重要性,我想知道。 编辑:我正在使用 最佳
在 IE 8 中,我们可以带出开发者工具。然后在顶部,有一个浏览器模式: IE 7 IE 8 IE 8 Compatibility View 所以如果 IE 7是强制页面显示为好像浏览器是 IE 7,
我认为不需要任何描述。我只需要我的 IE 11 单选按钮与 IE 8 中的一样,即颜色为 3-d 蓝色。在 IE 11 中,默认单选按钮是二维的,颜色为黑色。目前还没有解决这个问题。 最佳答案 检查这
我必须编写一个显示密码对话框的小程序。问题是对话框设置为始终在顶部,但是当用户单击 IE 窗口时,对话框仍然隐藏在 IE 窗口后面。并且由于对话框是模态的并且保持全部 IE 线程 IE Pane 不会
如何制作适用于所有 IE 浏览器的样式表。不只是 ie.css 中的 IE 8 本站主题的ie.css文件中只包含IE8样式。 最佳答案 他们这样做的原因是因为他们可能不支持 Internet Exp
使用有什么区别吗 ... 或者 ... ? 最佳答案 如果一种罕见的、神话般的浏览器被称为 ,就会有所不同。 Internet Explorer 6.66 被发现。 关于internet-explor
我试图在 IE7+8 中使用字体图标并遇到了一个问题,这个问题可以通过仅 IE7 的样式表轻松解决。长话短说,现在 IE7 和 IE9 都以某种方式运行我的仅 IE7 样式表(IE8 运行得很好)。我
我实现了上传的图片显示在网站上。为了 图片未正确上传意味着我将错误图片替换为 那?当我加载网站时,我遇到了 错误图像不存在的问题 定义,并且灯箱在 chrome 和 firefox 中加载 但它没有在
我有一个特殊的问题。我正在尝试“现代化”和为旧 IE 制作的旧应用程序,以便在 IE 11 中工作。但不知何故,CSS 类没有应用于 DOM 元素。 CSS 非常简单: .header { h
对于 IE 7 和 IE 8,IE 上 URL 的 2k 长度限制是否仍然存在? (后 IE 6 时代) 最佳答案 http://support.microsoft.com/kb/208427 似乎它
我们正在完善这个网站:dev.underglassframing.com 除了主要内容 div (#main) 后面的背景在 IE 7、8 和 9 中的内容之前停止外,在每个浏览器中一切都很好。我在末
我在 IE 11 中搜索过与 border-radius 相关的类似问题,但是 only one found on the Microsoft IE Developer site描述了自从“升级”到
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit th
这个问题在这里已经有了答案: (CSS?) Eliminating browser's 'selected' lines around a hyperlinked image? (5 个答案) 关闭
我知道有 1000 个问题,但我就是无法让它发挥作用。我只是想针对所有版本的 IE(包括 IE11)并给 html 一个特定的类,对于所有其他浏览器(firefox、opera、chrome),我希望
我有一个嵌入了 Internet Explorer 的程序。 在某些情况下,我需要调整嵌入式 IE 的缩放级别。我正在使用带有 OLECMDID_OPTICAL_ZOOM 的 ExecWB 命令来执行
我正在开发一个网络应用程序。我的应用程序在 chrome 和 firefox 上运行良好,但由于某种原因在 IE 中出现了一些错误。即使出现几个错误,应用程序仍然可以顺利运行,没有明显的问题。 我想对
我是一名优秀的程序员,十分优秀!